From ed648c812c5182da8a47353da1e7092ba9179ea1 Mon Sep 17 00:00:00 2001 From: Ross Whitfield Date: Thu, 30 Nov 2023 12:49:55 +1100 Subject: [PATCH] Add integration tests to github actions --- .github/workflows/actions.yml | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index e53d2e7..8bdaaf4 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -3,8 +3,6 @@ name: CI on: pull_request: push: - branches: main - tags: ['v*'] workflow_dispatch: @@ -34,6 +32,36 @@ jobs: env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + integration-tests: + runs-on: ubuntu-latest + needs: tests + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Set up MicroMamba + uses: mamba-org/setup-micromamba@v1 + with: + environment-file: environment.yml + condarc: | + channels: + - conda-forge + - default + cache-environment: true + + - name: start docker containers + run: docker-compose -f tests/integration/docker-compose.yml up --build -d + + - name: sleep to wait for containers to start up + run: sleep 2 + + - name: Run integration tests + shell: bash -l {0} + run: python -m pytest tests/integration + + - name: stop docker containers + run: docker-compose -f tests/integration/docker-compose.yml down + rpm: runs-on: ubuntu-latest