From 45b7354f5301b1de847079d37ee45ecfc28b1fa6 Mon Sep 17 00:00:00 2001 From: Fergal Date: Fri, 19 Jul 2024 12:04:41 +0100 Subject: [PATCH] ci(gha): pipelines for keri ballot verifier service (#548) * build: remove compose file * ci(gha): keri-ballot-verifier tests and docker publish * ci(gha): install libsodium on self-hosted * ci(gha): revert docker publish (changing to earthly soon) * ci(gha): only run tests on push to main/develop --- .github/workflows/test.yaml | 29 +++++++++++++++++++ .../keri-ballot-verifier/docker-compose.yaml | 13 --------- 2 files changed, 29 insertions(+), 13 deletions(-) delete mode 100644 backend-services/keri-ballot-verifier/docker-compose.yaml diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index f45018c68..a8834a4f7 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -2,6 +2,9 @@ name: Run Tests on: push: + branches: + - main + - develop pull_request: types: [ opened, synchronize ] workflow_dispatch: @@ -47,3 +50,29 @@ jobs: BRANCH: gh-pages folder: ./backend-services/${{ matrix.service }}/build/reports/jacoco/test/html target-folder: ${{ matrix.service }}/coverage-report/ + + pytest: + runs-on: self-hosted + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up Python 3.12.2 + uses: actions/setup-python@v2 + with: + python-version: 3.12.2 + + - name: Install libsodium + run: sudo apt-get install -y libsodium23 + + - name: Install dependencies + working-directory: ./backend-services/keri-ballot-verifier + run: | + python -m pip install --upgrade pip + pip install pytest + pip install -r requirements.txt + + - name: Run tests + working-directory: ./backend-services/keri-ballot-verifier + run: | + pytest tests/ diff --git a/backend-services/keri-ballot-verifier/docker-compose.yaml b/backend-services/keri-ballot-verifier/docker-compose.yaml deleted file mode 100644 index f70536100..000000000 --- a/backend-services/keri-ballot-verifier/docker-compose.yaml +++ /dev/null @@ -1,13 +0,0 @@ -version: '3.9' - -services: - ballot-verifier: - restart: unless-stopped - build: - context: . - target: ballot-verifier - environment: - - PYTHONUNBUFFERED=1 - ports: - - 5666:5666 - - 5667:5667 \ No newline at end of file