Api articles #9
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: Test & Deploy | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test-setup: | |
name: Utils Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
- name: install dependencies | |
run: npm ci | |
- name: run utils tests | |
run: npm run test-utils | |
test-app: | |
name: App Test | |
runs-on: ubuntu-latest | |
needs: test-setup | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
- name: install dependencies | |
run: npm ci | |
- name: Use PostgreSQL | |
uses: harmon758/postgresql-action@v1 | |
with: | |
postgresql db: 'my_db' | |
postgresql user: 'tester' | |
postgresql password: 'password' | |
- name: run app tests | |
run: PGDATABASE=mydb PGUSER='tester' PGPASSWORD=password npm run test-utils |