clean up leftovers from previous commits, and use --wait to wait for … #2199
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: CI | |
on: [pull_request, push] | |
jobs: | |
ci-test: | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.11"] | |
poetry-version: ["1.4.2"] | |
os: [ubuntu-20.04, macos-latest, windows-latest] | |
project: | |
[ | |
bia-ingest, | |
bia-shared-datamodels, | |
core, | |
] | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
working-directory: ${{ matrix.project }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Run image | |
uses: abatilo/actions-poetry@v2 | |
with: | |
poetry-version: ${{ matrix.poetry-version }} | |
- name: View poetry --help | |
run: poetry --help | |
- name: Poetry env setup | |
run: poetry env use python | |
- name: Poetry install | |
run: poetry install | |
- name: Check to see if poetry can build | |
run: poetry build | |
- name: Run pytest | |
run: poetry run pytest | |
ci-test-with-api: | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.11"] | |
poetry-version: ["1.4.2"] | |
# Note we do not test on windows or mac. Currently, github mac runners do not support nested virtualization, so we cannot run docker on them (since mac docker virtualises linux) | |
# See https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#limitations-for-arm64-macos-runners | |
os: [ubuntu-20.04] | |
project: | |
[ | |
bia-export, | |
] | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
working-directory: ${{ matrix.project }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Run poetry image | |
uses: abatilo/actions-poetry@v2 | |
with: | |
poetry-version: ${{ matrix.poetry-version }} | |
- name: Run docker | |
run: docker compose up -d --build --wait | |
- name: set up poetry | |
run: | | |
poetry env use python | |
poetry install | |
- name: Run pytest | |
run: poetry run pytest | |
# Always cleanup - even for cancelled jobs | |
- name: Docker Compose Down | |
run: | | |
docker compose down | |
if: ${{ always() }} | |