Hitpoint 2024: add workshops #926
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: test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test-and-lint: | |
runs-on: ubuntu-22.04 | |
env: | |
CI: true | |
HUSKY: 0 | |
timeout-minutes: 30 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set actionlint Problem Matchers | |
run: | | |
echo "::add-matcher::.github/actionlint-matcher.json" | |
shell: bash | |
- name: Run actionlint | |
uses: docker://rhysd/actionlint:1.7.1 | |
with: | |
args: -color | |
- name: Use Node.js 20.16.0 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.16.0 | |
cache: "yarn" | |
- name: Yarn install | |
run: | | |
YARN_ENABLE_HARDENED_MODE=1 yarn --immutable | |
- name: Build front-end | |
run: | | |
yarn build-front:prod | |
- name: Run Prettier | |
run: | | |
yarn prettier:check | |
- name: Run ESLint | |
run: | | |
yarn eslint | |
- name: Run stylelint | |
run: | | |
yarn stylelint | |
- name: TS type check | |
run: | | |
yarn type-check | |
- name: Cache MongoDB binary | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/mongodb-binaries | |
key: ${{ runner.os }}-mongodb | |
- name: Run Vitest tests | |
run: | | |
yarn test | |
- name: Run Playwright tests | |
run: | | |
yarn docker-compose:test | |
- name: Upload test results if Playwright tests failed | |
uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: playwright-videos | |
path: playwright/test-results/ |