Skip to content

Commit 29d8160

Browse files
committed
Improve test gha
1 parent ecaa883 commit 29d8160

File tree

1 file changed

+7
-41
lines changed

1 file changed

+7
-41
lines changed

.github/workflows/pr_tests.yml

Lines changed: 7 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,10 @@ jobs:
1515
uses: actions/checkout@v4
1616

1717
- name: Set up Rust
18-
uses: dtolnay/rust-toolchain@stable
18+
uses: dtolnay/rust-toolchain@1.85.0
1919

2020
- name: Run unit tests
21-
run: cargo test --workspace
22-
23-
- name: Run doc tests
24-
run: cargo test --workspace --doc
21+
run: cargo test --workspace --lib --bins
2522

2623
build:
2724
name: Build
@@ -31,7 +28,7 @@ jobs:
3128
uses: actions/checkout@v4
3229

3330
- name: Set up Rust
34-
uses: dtolnay/rust-toolchain@stable
31+
uses: dtolnay/rust-toolchain@1.85.0
3532
with:
3633
components: clippy
3734

@@ -44,45 +41,14 @@ jobs:
4441
functional-tests:
4542
name: Functional Tests
4643
runs-on: ubuntu-latest
47-
needs: build
4844
steps:
4945
- name: Checkout repository
5046
uses: actions/checkout@v4
5147

52-
- name: Set up Python
53-
uses: actions/setup-python@v5
54-
with:
55-
python-version: "3.11"
48+
- name: Set up Docker Buildx
49+
uses: docker/setup-buildx-action@v3
5650

57-
- name: Install Python dependencies
51+
- name: Run functional tests with devtool
5852
run: |
59-
pip install pytest pytest-timeout pytest-json-report requests psutil tenacity filelock "urllib3<2.0" requests-unixsocket aws-embedded-metrics
60-
61-
- name: Set up Rust
62-
uses: dtolnay/rust-toolchain@stable
63-
64-
- name: Build Firecracker release
65-
run: cargo build --release
66-
67-
- name: Check KVM availability
68-
id: check_kvm
69-
run: |
70-
if [ -c /dev/kvm ] && [ -r /dev/kvm ] && [ -w /dev/kvm ]; then
71-
echo "kvm_available=true" >> $GITHUB_OUTPUT
72-
else
73-
echo "kvm_available=false" >> $GITHUB_OUTPUT
74-
echo "⚠️ KVM not available - functional tests will skip"
75-
fi
76-
77-
- name: Run functional tests
78-
if: steps.check_kvm.outputs.kvm_available == 'true'
79-
run: |
80-
cd tests
81-
sudo env PATH="$PATH" PYTHONPATH=. pytest -m 'not nonci and not no_block_pr' integration_tests/functional/
53+
./tools/devtool -y test -- integration_tests/functional/
8254
continue-on-error: true
83-
84-
- name: Collect functional tests (dry run)
85-
if: steps.check_kvm.outputs.kvm_available == 'false'
86-
run: |
87-
cd tests
88-
pytest --collect-only -m 'not nonci and not no_block_pr' integration_tests/functional/

0 commit comments

Comments
 (0)