Test suites creation 2 #23
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: Build and Test | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-24.04] | |
node-version: [20.x] | |
mongodb-version: ['7.0'] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Start MongoDB | |
uses: supercharge/mongodb-github-action@1.10.0 | |
with: | |
mongodb-version: ${{ matrix.mongodb-version }} | |
- name: npm install | |
run: npm i | |
- name: Setup CI config | |
run: | | |
echo $CI_CONFIG > config/serviceAccountKey.json | |
shell: bash | |
env: | |
CI_CONFIG: ${{ secrets.SERVICE_ACCOUNT_CI }} | |
- name: Run tests and collect coverage | |
run: | | |
npm run test | |
env: | |
CI: true | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
verbose: true | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |