Add concurrency in workflows and split check doc #32
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: Unit Tests | |
on: | |
workflow_call: | |
push: | |
branches: [main] | |
pull_request: | |
types: [synchronize, opened, reopened, ready_for_review, converted_to_draft] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
tests: | |
name: Run Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'npm' | |
- name: Install Dependencies | |
run: npm ci --ignore-scripts | |
- name: Prepare nuxt dependencies | |
run: npm run postinstall | |
- name: Run tests | |
run: npm run coverage | |
- name: Coveralls | |
uses: coverallsapp/github-action@v2 |