Вместо маленького котэ нам нужен большой котэ #917
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 Lint | |
on: [pull_request] | |
jobs: | |
build-lint: | |
runs-on: ubuntu-latest | |
env: | |
CI: '' # hack to allow build with warnings. FIXME: fix warnings and remove in the future | |
strategy: | |
matrix: | |
module: [backend, frontend] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: "18" | |
- name: Cache dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.npm | |
key: npm-${{matrix.module}}-${{ hashFiles(format('./{0}/package.json', matrix.module)) }} | |
restore-keys: npm-${{matrix.module}}- | |
- name: install_dependencies | |
working-directory: ${{matrix.module}} | |
run: npm install | |
- name: run linter | |
working-directory: ${{matrix.module}} | |
run: npm run lint | |
- name: run build | |
working-directory: ${{matrix.module}} | |
run: npm run build | |
- name: test | |
working-directory: ${{matrix.module}} | |
if: matrix.module == 'backend' | |
run: npm run test |