Merge pull request #83 from akai-org/issue-58 #216
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: Frontend CI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: frontend | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js 18.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
cache: 'yarn' | |
cache-dependency-path: 'frontend/yarn.lock' | |
- name: Install dependencies | |
run: yarn install --frozen-lockfile | |
- name: Build app | |
run: yarn run build | |
- name: Test app | |
run: yarn run test:prod | |
scan: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: frontend | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js 18.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
cache: 'yarn' | |
cache-dependency-path: 'frontend/yarn.lock' | |
- name: Install dependencies | |
run: yarn install --frozen-lockfile | |
- name: Run ESLint | |
run: npx eslint . | |
--config .eslintrc.json | |
--ext .js,.jsx,.ts,.tsx | |
--fix | |
--format @microsoft/eslint-formatter-sarif | |
--output-file eslint-results.sarif | |
--ignore-path .gitignore | |
continue-on-error: true | |
- name: Upload analysis results to GitHub | |
uses: github/codeql-action/upload-sarif@v2 | |
with: | |
sarif_file: frontend/eslint-results.sarif | |
wait-for-processing: true | |