Merge pull request #8 from uclapi/shu8/use-ad-groups #25
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" | |
on: | |
push | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Load env variables | |
id: dotenv | |
uses: falti/dotenv-action@v1.0.2 | |
with: | |
path: "./.env.test" | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: ^7.17.1 | |
- name: Docker compose build and up | |
run: | | |
docker-compose -f docker-compose-test.yml up -d | |
pnpm install | |
DATABASE_URL=${{ steps.dotenv.outputs.DATABASE_URL }} npm run migrate | |
- name: Run tests | |
run: | | |
DATABASE_URL=${{ steps.dotenv.outputs.DATABASE_URL }} npm run test:api |