Improvements, and Complete Blockera repository CI/CD workflows #605
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: JavaScript Unit Tests (By Jest) | |
on: | |
pull_request: | |
types: [opened, synchronize, ready_for_review] | |
workflow_dispatch: | |
# Cancels all previous workflow runs for pull requests that have not completed. | |
concurrency: | |
# The concurrency group contains the workflow name and the branch name for pull requests | |
# or the commit hash for any other events. | |
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} | |
cancel-in-progress: true | |
jobs: | |
unit-js: | |
name: JavaScript | |
runs-on: ubuntu-latest | |
if: ${{ github.repository == 'blockeraai/blockera' || github.event_name == 'pull_request' }} | |
strategy: | |
fail-fast: false | |
matrix: | |
node: ['18.3.0'] | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Setup Node.js and install dependencies | |
uses: ./.github/setup-node | |
- name: Npm build | |
run: npm run build | |
- name: Running the tests | |
run: npm run test:js -- --ci --maxWorkers=2 --cacheDirectory="$HOME/.jest-cache" |