tests: add tests for api-sirene connector #193
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: Fixtures tests | |
on: | |
push: | |
branches: | |
- "**" | |
- "!master" | |
env: | |
ACCESS_LOG_PATH: | |
PGUSER: api-auth | |
PGPASSWORD: api-auth | |
PGDATABASE: api-auth | |
PGHOST: 127.0.0.1 | |
PGPORT: 5432 | |
INSEE_CONSUMER_KEY: ${{ secrets.INSEE_CONSUMER_KEY }} | |
INSEE_CONSUMER_SECRET: ${{ secrets.INSEE_CONSUMER_SECRET }} | |
jobs: | |
test: | |
runs-on: ubuntu-20.04 | |
services: | |
postgres: | |
image: postgres:12.12 | |
env: | |
POSTGRES_USER: ${{ env.PGUSER }} | |
POSTGRES_PASSWORD: ${{ env.PGPASSWORD }} | |
POSTGRES_DB: ${{ env.PGDATABASE }} | |
ports: | |
- 5432:5432 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
- name: Cache node modules | |
uses: actions/cache@v3 | |
env: | |
cache-name: cache-node-modules | |
with: | |
# npm cache files are stored in `~/.npm` on Linux/macOS | |
path: ~/.npm | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- run: npm ci | |
- run: npm run load-fixtures | |
env: | |
DATABASE_URL: postgres://${{ env.PGUSER }}:${{ env.PGPASSWORD }}@127.0.0.1:${{ env.PGPORT }}/${{ env.PGDATABASE }} |