Skip to content

Commit

Permalink
add funnel into workflow as TES instance is required for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelnikonorov committed Oct 26, 2024
1 parent e1532be commit 7442c57
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/code_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,43 @@ on:
- main

jobs:
common-steps:
name: common setup steps
runs-on: ubuntu-latest
outputs:
rust-toolchain: ${{ steps.set-toolchain.outputs.version }}
steps:
- name: Stop existing Funnel container if running
run: |
docker stop $(docker ps -q --filter ancestor=ohsucompbio/funnel:latest) || true
shell: bash

- name: Start Funnel
run: |
docker run -d -p 8000:8000 ohsucompbio/funnel:latest \
server run --Server.HostName=localhost --Server.HTTPPort=8000
shell: bash

- name: Wait for Funnel to be healthy
run: |
until curl --fail http://localhost:8000/v1/tasks; do
echo "Waiting for Funnel to be healthy..."
sleep 3
done
shell: bash

integration-tests:
name: Run integration tests
runs-on: ubuntu-latest
needs: common-steps
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Install rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable

- name: Run integration tests
run: cargo test --tests
Expand All @@ -42,12 +70,18 @@ jobs:
unit-tests:
name: Run unit tests
runs-on: ubuntu-latest
needs: common-steps
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Install rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable

- name: Install cargo-tarpaulin
run: cargo install cargo-tarpaulin

- name: Run unit tests
run: cargo test --lib
Expand Down

0 comments on commit 7442c57

Please sign in to comment.