Fix GitHub Actions #2
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: General Repo Health and Test Status | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
lint-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set bash to strict mode | |
run: set -euox pipefail | |
- name: Set Node.js 22.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 22.x | |
- name: Install yarn | |
run: npm -g install yarn | |
- name: Install dependencies | |
run: npx yarn | |
- name: Lint | |
run: npx yarn lint-staged | |
- name: Print errors | |
run: find . -name "*.warn" -type f -exec cat {} \; | |
- name: Fail on errors | |
if: ${{ steps.lint.outputs.error || steps.test.outputs.error || steps.build-sa360.outputs.error || steps.build-dv360.outputs.error || steps.build-dev-sa360.outputs.error }} | |
run: exit 1 | |
- name: Build | |
run: npx yarn playwright install | |
- name: Test everything | |
run: npx yarn test |