Skip to content

Replace wait-on with wait-port #404

Replace wait-on with wait-port

Replace wait-on with wait-port #404

Workflow file for this run

name: Tests
on:
push:
pull_request:
branches:
- master
jobs:
unit:
name: Unit tests
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Setup node from node version file
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Install dependencies
run: yarn --frozen-lockfile --non-interactive --silent --ignore-scripts
- name: Prepare docker
run: docker pull yukinying/chrome-headless-browser-stable:118.0.5993.117
- name: Prepare docker lambda
run: yarn pretest
- name: Run unit tests
run: yarn test-ci
static-analysis:
name: Static analysis
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Setup node from node version file
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Install dependencies
run: yarn --frozen-lockfile --non-interactive --silent --ignore-scripts
- name: Run ESLint
run: yarn lint
integration-cli:
name: 'Integration tests: CLI'
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Install dependencies
run: yarn --frozen-lockfile --non-interactive --silent --ignore-scripts
- name: Run integration tests
run: yarn workspace @loki/test-cli test
- name: Archive screenshots
if: ${{ failure() }}
uses: actions/upload-artifact@v1
with:
name: cra-integration-screenshots
path: test/cli/generated/create-react-app/.loki
visual-react-dom:
name: 'Visual tests: React DOM'
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Setup node from node version file
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Install dependencies
run: yarn --frozen-lockfile --non-interactive --silent --ignore-scripts
- name: Run loki
run: yarn workspace @loki/example-react test-ci
- name: Archive screenshots
if: ${{ failure() }}
uses: actions/upload-artifact@v1
with:
name: react-example-screenshots
path: examples/react/.loki