From 4890a7f75e770c3bcfb1bb285cdb383c77f5d76f Mon Sep 17 00:00:00 2001 From: rolv Date: Tue, 12 Nov 2024 23:00:00 +0000 Subject: [PATCH] ci: run `docker-compose` stack so that the tests can actually be run in CI --- .github/workflows/check.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index d2c46ac..f008af4 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -44,5 +44,18 @@ jobs: - name: Lint run: cargo clippy --all -- -D warnings - - name: Tests - run: cargo test --all --verbose + - name: Tests - + if: matrix.os == 'ubuntu-latest' + run: | + # Full tests for Linux only, due to requirement of running local API hosted through docker + if [ "$RUNNER_OS" == "Linux" ]; then + docker compose up -d --wait + # Wait for Frankfurter container to fetch data + sleep 60 + cargo test --all --verbose + docker compose down + else + cargo test --package lib_frankfurter --lib + cargo test --package frankfurter_cli --bin frs + fi + shell: bash