Merge pull request #487 from c0rydoras/fix/ci/permissions #609
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 (Frontend) | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
env: | |
CI: true | |
NODE_VERSION: 18 | |
jobs: | |
lint: | |
name: Lint (Frontend) | |
runs-on: [ubuntu-latest] | |
strategy: | |
matrix: | |
target: [js, hbs] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
cache: "yarn" | |
cache-dependency-path: 'frontend/yarn.lock' | |
- name: Install dependencies | |
run: yarn install --frozen-lockfile --cwd=frontend | |
- name: Lint ${{ matrix.target }} | |
run: yarn --cwd=frontend lint:${{ matrix.target }} | |
test: | |
name: Tests (Frontend) | |
needs: [lint] | |
runs-on: [ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
cache: "yarn" | |
cache-dependency-path: 'frontend/yarn.lock' | |
- name: Install dependencies | |
run: yarn install --frozen-lockfile --cwd=frontend | |
- name: Run tests | |
run: yarn --cwd=frontend test |