Implement database infra utilities and tests for api (#118, #122) #3
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 CI | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Check for changes | |
uses: dorny/paths-filter@v2 | |
id: filter | |
with: | |
filters: | | |
api: | |
- 'api/**' | |
shared: | |
- 'shared/**' | |
- name: Validate API | |
if: steps.filter.outputs.api == 'true' || steps.filter.outputs.shared == 'true' | |
run: | | |
cd api | |
npm install | |
npm run test:unit | |
- name: Build the Docker image for API | |
if: steps.filter.outputs.api == 'true' || steps.filter.outputs.shared == 'true' | |
run: docker build . --file ./api/Dockerfile |