Nextflow scripts for export #830
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: Docker Compose Test API | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
jobs: | |
docker-compose-test: | |
runs-on: ubuntu-latest | |
environment: | |
name: test | |
env: | |
MONGO_INITDB_ROOT_PASSWORD: ${{ secrets.MONGO_INITDB_ROOT_PASSWORD }} | |
MONGO_INITDB_ROOT_USERNAME: ${{ vars.MONGO_INITDB_ROOT_USERNAME }} | |
MONGO_CONNSTRING: mongodb://${{ vars.MONGO_INITDB_ROOT_USERNAME }}:${{ secrets.MONGO_INITDB_ROOT_PASSWORD }}@biaint-mongo:27017 | |
DB_NAME: ${{ vars.DB_NAME }} | |
JWT_SECRET_KEY: ${{ secrets.JWT_SECRET_KEY }} | |
USER_CREATE_SECRET_TOKEN: ${{ secrets.USER_CREATE_SECRET_TOKEN }} | |
defaults: | |
run: | |
working-directory: ./ | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 # Checkout your repository to the GitHub Actions runner | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 # Set up Docker Buildx for building and pushing Docker images | |
- name: Cache Docker layers | |
uses: actions/cache@v2 # Cache Docker layers to speed up subsequent builds | |
with: | |
path: /tmp/.buildx-cache | |
key: ${{ runner.os }}-buildx-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-buildx- | |
- name: Docker Compose Up | |
run: | | |
docker compose up -d --build | |
- name: Run tests | |
# api moved to api/ , src left in as a reference as we transition. All tests there are failing and that directory will be deleted anyway | |
run: | | |
docker compose run -T bia-integrator-api poetry run pytest --ignore src | |
- name: Run client example tests to reuse db | |
run: | | |
make client.examples | |
# Always cleanup - even for cancelled jobs | |
- name: Docker Compose Down | |
run: | | |
docker compose down | |
if: ${{ always() }} |