Fix/token-validation #39
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: Run tests | |
on: | |
push: | |
branches: | |
- dev | |
- main | |
pull_request: | |
branches: | |
- dev | |
- main | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout git files | |
uses: actions/checkout@v3 | |
- name: Run docker-compose | |
uses: hoverkraft-tech/compose-action@v2.0.1 | |
with: | |
up-flags: "-d" | |
compose-file: "./docker/docker-compose-test.yml" | |
- name: Use Node.js Version 20.X | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20.x' | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm ci | |
- name: Run migrations | |
run: npm run pre-run:prepare-database | |
env: | |
DATABASE_URL: ${{ secrets.DATABASE_URL }} | |
- name: Run tests | |
run: npm run test:ci | |
env: | |
WEBHOOK_SECRET: ${{ secrets.WEBHOOK_SECRET }} | |
CLERK_JWT_SECRET_KEY: ${{ secrets.CLERK_JWT_SECRET_KEY}} | |
SECRET_KEY_SESSION: ${{secrets.SECRET_KEY_SESSION}} | |
MONGO_URI: ${{secrets.MONGO_URI}} | |
DATABASE_URL: ${{secrets.DATABASE_URL}} | |
DATABASE_TEST_URL: ${{secrets.DATABASE_TEST_URL}} | |
PORT: 3000 |