Show number of transfer credits taken in pill #341
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: Tests | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- 'develop' | |
- 'main' | |
paths-ignore: | |
- '*.md' | |
jobs: | |
integration-tests: | |
name: Integration tests | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:latest | |
env: | |
POSTGRES_DB: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_USER: postgres | |
ports: | |
- 5432:5432 | |
# Set health checks to wait until postgres has started | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
env: | |
# Prisma | |
DIRECT_DATABASE_URL: postgresql://postgres:postgres@localhost:5432/postgres?schema=public | |
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/postgres?schema=public | |
PLATFORM_DATABASE_URL: ${{ secrets.PLATFORM_DATABASE_URL }} | |
# Next Auth | |
NEXTAUTH_URL: http://localhost:3000 | |
NEXTAUTH_SECRET: abc | |
# Next Auth Discord Provider | |
DISCORD_CLIENT_ID: 123 | |
DISCORD_CLIENT_SECRET: abc | |
# Next Auth Google Provider | |
GOOGLE_CLIENT_ID: 123 | |
GOOGLE_CLIENT_SECRET: abc | |
# Next Auth Facebook provider | |
FACEBOOK_CLIENT_ID: 123 | |
FACEBOOK_CLIENT_SECRET: abc | |
# Email Server | |
EMAIL_SERVER_HOST: host | |
EMAIL_SERVER_PORT: 1234 | |
EMAIL_SERVER_USER: user | |
EMAIL_SERVER_PASSWORD: pass | |
EMAIL_FROM: [email protected] | |
# DEGREE VALIDATOR | |
NEXT_PUBLIC_VALIDATOR: http://127.0.0.1:5000 | |
NODE_ENV: test | |
# UMAMI | |
NEXT_PUBLIC_UMAMI_URL: hi | |
NEXT_PUBLIC_UMAMI_WEBSITE_ID: bye | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Python3.11 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Start validator server | |
working-directory: validator | |
run: | | |
pip install -r requirements.txt | |
flask --app api run & | |
- name: Start MongoDB | |
uses: supercharge/[email protected] | |
with: | |
mongodb-replica-set: test-rs | |
mongodb-version: '6.0' | |
mongodb-port: 27017 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Install dependencies | |
run: | | |
npm ci | |
- name: Run build pipeline | |
run: npm run build | |
- name: Start server and run e2e tests | |
run: | | |
npm run cypress:run | |
unit-tests: | |
name: Unit tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Install dependencies | |
run: | | |
npm ci | |
- name: Run unit tests with Jest | |
run: | | |
npm test -- --silent |