[B2BP-1105] Fix CMS deploy github action #2927
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: Code Review | |
concurrency: | |
group: ci-${{ github.head_ref }}-${{ github.base_ref }} | |
cancel-in-progress: true | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
compile: | |
name: Compile project | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 | |
- name: Setup Node.JS | |
uses: ./.github/actions/setup-node | |
- name: Check lock file | |
run: npx -y [email protected] | |
- name: Check for new dependencies | |
if: github.event_name == 'pull_request' # Check for new dependencies only if trigger is pull_request | |
uses: hiwelo/new-dependencies-action@e4175e14484328f9ab56df91e420e90ad5031c08 # v1.0.1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install dependencies | |
run: npm ci --audit=false --fund=false | |
- name: Compile | |
run: npm run compile | |
- name: Store in cache | |
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 | |
id: restore-build | |
with: | |
path: ./* | |
key: ${{ github.sha }} | |
code_checks: | |
name: Code checks | |
runs-on: ubuntu-latest | |
needs: compile | |
steps: | |
- name: Restore cache | |
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 | |
id: restore-build | |
with: | |
path: ./* | |
key: ${{ github.sha }} | |
- name: Check lint rules | |
run: npm run lint | |
- name: Run tests | |
run: npm run test | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |