Merge branch 'main' into dependabot/npm_and_yarn/sinon-15.2.0 #1682
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
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
name: Node.js CI | |
on: [push] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v2 | |
- name: Use Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 16.x | |
- name: Install dependencies | |
run: npm ci | |
- name: Run linter | |
run: npm run lint | |
test: | |
env: | |
AWS_STORAGE_BUCKET: finance_bucket | |
strategy: | |
matrix: | |
os: [ubuntu-20.04, ubuntu-22.04] | |
node-version: [14.x, 16.x, 18.x] | |
runs-on: ${{ matrix.os }} | |
services: | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: finance_test | |
ports: | |
- 5432:5432 | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install dependencies | |
run: npm ci | |
- name: Run tests | |
run: npm run test:ci | |
- name: Send partial coverage report | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.github_token }} | |
flag-name: run-${{ matrix.os }}-${{ matrix.node-version }} | |
parallel: true | |
send_coverage_report: | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Send final coverage report | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.github_token }} | |
parallel-finished: true |