refactor to use jwtManager #64
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: API Tests | |
on: | |
push: | |
paths: | |
- 'api/**' | |
- 'shared/**' | |
- '.github/workflows/api-tests.yml' | |
- '/*' # include changes in root | |
- '!client/**' # exclude client folder | |
- '!infrastructure/**' # exclude infra folder | |
- 'package.json' | |
workflow_dispatch: | |
jobs: | |
api-tests-integration: | |
name: API Integration Tests | |
runs-on: ubuntu-22.04 | |
services: | |
database: | |
image: postgres:13 | |
ports: | |
- 5432:5432 | |
env: | |
POSTGRES_USER: blue-carbon-cost | |
POSTGRES_PASSWORD: blue-carbon-cost | |
POSTGRES_DB: blc | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Node setup | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
- uses: pnpm/action-setup@v4 | |
- name: Cache dependencies | |
uses: actions/cache@v3 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-node_modules-${{ hashFiles('pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-node_modules- | |
- name: Install dependencies | |
working-directory: . | |
run: pnpm install | |
- name: Run API tests | |
working-directory: api | |
run: pnpm test |