BCAT | only deploy to dev and test when merge to develop #227
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: BE PR Checks | |
env: | |
GIT_LOCAL_BRANCH: ${{ github.sha }} | |
on: [pull_request] | |
jobs: | |
be-pr-checks: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./api | |
steps: | |
- uses: actions/checkout@v3 | |
name: checkout | |
- name: Setup pre-reqs | |
run: | | |
npm install yarn -g && yarn set version ./.yarn/releases/yarn-3.2.4.cjs | |
shell: bash | |
- uses: actions/cache@v3 | |
name: Cache yarn | |
with: | |
path: api/.yarn/cache | |
key: ${{ runner.os }}-fe-yarn-${{ hashFiles('api/yarn.lock') }} | |
restore-keys: ${{ runner.os }}-fe-yarn-${{ hashFiles('api/yarn.lock') }} | |
- name: Install dependencies | |
run: | | |
yarn install --immutable | |
- name: Check lint & format | |
run: | | |
yarn run lint | |
yarn run format:check | |
- name: Test build | |
run: | | |
yarn build |