Don't shuffle inactive validators to the top #9690
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and test | |
on: | |
push: | |
branches: [stable, master] | |
pull_request: | |
branches: [stable, master] | |
# disable secrets.GITHUB_TOKEN permissions | |
permissions: {} | |
jobs: | |
yarn_cache: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js 18.x | |
uses: actions/setup-node@v3 | |
id: yarn-cache | |
with: | |
node-version: 18 | |
cache: 'yarn' | |
- if: steps.yarn-cache.outputs.cache-hit != 'true' | |
run: yarn install --frozen-lockfile | |
build: | |
needs: [yarn_cache] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js 18.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: 'yarn' | |
- run: yarn install --frozen-lockfile | |
- run: yarn lint --max-warnings 0 | |
- run: | | |
yarn fix-grommet-icons-types | |
git diff --exit-code | |
- run: yarn checkTs | |
- run: yarn build | |
jest: | |
needs: [yarn_cache] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js 18.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: 'yarn' | |
- run: yarn install --frozen-lockfile | |
- run: yarn test --coverage | |
- name: 'Upload coverage report' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: jest-coverage | |
path: coverage | |
retention-days: 5 | |
playwright: | |
needs: [yarn_cache] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js 18.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: 'yarn' | |
- run: yarn install --frozen-lockfile | |
- run: REACT_APP_E2E_TEST=1 yarn build:ext | |
- run: REACT_APP_E2E_TEST=1 yarn start:prod & | |
- name: Install playwright's npm dependencies | |
working-directory: ./playwright/ | |
run: yarn install --frozen-lockfile | |
- name: Install playwright's system dependencies | |
working-directory: ./playwright/ | |
run: npx playwright install --with-deps | |
- run: npx wait-on http://localhost:5000/ --timeout 60000 | |
- name: Run playwright tests (with xvfb-run to support headed extension test) | |
working-directory: ./playwright/ | |
run: BASE_URL=http://localhost:5000 EXTENSION_PATH=../build-ext/ xvfb-run yarn test | |
- name: 'Upload playwright test-results' | |
if: ${{ failure() }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: playwright-test-results | |
path: playwright/test-results | |
retention-days: 5 | |
cypress: | |
needs: [yarn_cache] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js 18.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: 'yarn' | |
- run: yarn install --frozen-lockfile | |
- run: docker-compose pull | |
- uses: satackey/[email protected] | |
# Ignore the failure of a step and avoid terminating the job. | |
continue-on-error: true | |
- run: REACT_APP_LOCALNET=1 REACT_APP_BACKEND=oasismonitor yarn start & | |
- run: docker-compose up --build -d | |
- run: npx wait-on http://localhost:3000/ --timeout 60000 | |
- run: yarn cypress:run | |
- name: 'Upload coverage report' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: cypress-coverage | |
path: cypress-coverage | |
retention-days: 5 | |
upload-coverage: | |
needs: [cypress, jest] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Download coverage reports | |
uses: actions/download-artifact@v3 | |
- uses: codecov/codecov-action@v3 | |
with: | |
files: ./jest-coverage/coverage-final.json | |
flags: jest | |
- uses: codecov/codecov-action@v3 | |
with: | |
files: ./cypress-coverage/coverage-final.json | |
flags: cypress |