Merge branch 'master' into master #42
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: Node.js CI | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [16.x, 18.x, 20.x] | |
redis-version: [6] | |
mongodb-version: ['5.0'] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Start Redis | |
uses: supercharge/[email protected] | |
with: | |
redis-version: ${{ matrix.redis-version }} | |
- name: Start MongoDB | |
uses: supercharge/[email protected] | |
with: | |
mongodb-version: ${{ matrix.mongodb-version }} | |
- uses: pnpm/[email protected] | |
name: Install pnpm | |
id: pnpm-install | |
with: | |
version: 7 | |
run_install: false | |
- name: Install dependencies | |
run: pnpm install | |
- name: Run tests | |
run: pnpm test | |
env: | |
CI: true | |
- name: Run coverage and upload | |
if: matrix.node-version == '18.x' | |
run: | | |
pnpm coverage | |
env: | |
CI: true | |
- name: Upload coverage to Codecov | |
if: matrix.node-version == '18.x' | |
uses: codecov/codecov-action@v4 | |
with: | |
fail_ci_if_error: true | |
verbose: true | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |