Skip to content

Commit

Permalink
ci: Separate unit and integration tests
Browse files Browse the repository at this point in the history
also run the unit test in sequence for now because they share the same
test resources e.g ports or ros topics.
  • Loading branch information
philipp-caspers committed Sep 24, 2024
1 parent 4a5ec32 commit 5d340a8
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 5 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@ jobs:
build:
needs: build_dev_container
uses: ./.github/workflows/ci_build.yml
test:
unit_test:
needs: build_dev_container
uses: ./.github/workflows/ci_test.yml
uses: ./.github/workflows/ci_unit_test.yml
integration_test:
needs: build_dev_container
uses: ./.github/workflows/ci_integration_test.yml
lint:
needs: build_dev_container
uses: ./.github/workflows/ci_lint.yml
21 changes: 21 additions & 0 deletions .github/workflows/ci_integration_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: CI Integration Test
'on':
workflow_call: null
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout (GitHub)
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Cargo integration tests
uses: devcontainers/[email protected]
with:
cacheFrom: ghcr.io/vorausrobotik/voraus-ros-bridge-dev
runCmd: cargo test --test '*' --verbose -- --test-threads=1
push: never
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI Test
name: CI Unit Test
'on':
workflow_call: null
jobs:
Expand All @@ -13,9 +13,9 @@ jobs:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Cargo test
- name: Cargo unit tests
uses: devcontainers/[email protected]
with:
cacheFrom: ghcr.io/vorausrobotik/voraus-ros-bridge-dev
runCmd: cargo test --verbose
runCmd: cargo test --bins --verbose
push: never

0 comments on commit 5d340a8

Please sign in to comment.