From 6789deecaf10307d5fbb23372ffa3bc788938f9a Mon Sep 17 00:00:00 2001 From: Jordan Barrett Date: Tue, 17 Oct 2023 14:42:14 +0700 Subject: [PATCH] run unit tests in CI --- .github/workflows/ci.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e3aa004..04eb11d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,8 +6,28 @@ on: jobs: + unit-tests: + name: Unit tests + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up virtualenv + run: | + virtualenv -p python3 venv + source venv/bin/activate + pip install -r requirements-dev.txt + + - name: Run tests + run: | + ./run_tests + + build: name: Build charms + needs: unit-tests uses: canonical/data-platform-workflows/.github/workflows/build_charms_with_cache.yaml@v4 with: artifact-name: charm-packed