Skip to content

Commit cee124d

Browse files
committed
GitHub CI: Added a job to run the Docker-based tests too.
1 parent 0f3da98 commit cee124d

1 file changed

Lines changed: 21 additions & 4 deletions

File tree

.github/workflows/cargo-workflow.yaml

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ jobs:
8989
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9090
# Integration tests
9191
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
92-
tests:
92+
tests-native:
9393
name: cargo test
9494
needs: [format, checks]
9595
strategy:
@@ -110,6 +110,23 @@ jobs:
110110
- run: |
111111
make docker.swtpm DETACH=1
112112
make tests RUST_LOG=info TSS2_LOG=all+none FAPI_RS_TEST_PROF=${{ matrix.profile }}
113+
make docker.down
114+
115+
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
116+
# Docker-based tests
117+
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
118+
tests-docker:
119+
name: docker tests
120+
needs: [format, checks]
121+
runs-on: ubuntu-${{ inputs.OS_VERS_MAX }}
122+
steps:
123+
- uses: actions/checkout@v4
124+
- uses: actions-rust-lang/setup-rust-toolchain@v1
125+
with:
126+
toolchain: ${{ matrix.rust }}
127+
cache: false
128+
- run: |
129+
make docker.tests
113130
114131
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
115132
# Code coverage analysis (codecov)
@@ -147,7 +164,7 @@ jobs:
147164
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
148165
build:
149166
name: cargo build
150-
needs: [examples, tests]
167+
needs: [examples, tests-native, tests-docker]
151168
strategy:
152169
fail-fast: false
153170
matrix:
@@ -183,7 +200,7 @@ jobs:
183200
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
184201
docs:
185202
name: cargo doc
186-
needs: [examples, tests]
203+
needs: [examples, tests-native, tests-docker]
187204
runs-on: ubuntu-${{ inputs.OS_VERS_MAX }}
188205
steps:
189206
- uses: actions/checkout@v4
@@ -207,7 +224,7 @@ jobs:
207224
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
208225
package:
209226
name: cargo package
210-
needs: [examples, tests]
227+
needs: [examples, tests-native, tests-docker]
211228
runs-on: ubuntu-${{ inputs.OS_VERS_MAX }}
212229
steps:
213230
- uses: actions/checkout@v4

0 commit comments

Comments
 (0)