Skip to content

Commit 214264f

Browse files
committed
Add test
1 parent ecaa883 commit 214264f

File tree

1 file changed

+8
-72
lines changed

1 file changed

+8
-72
lines changed

.github/workflows/pr_tests.yml

Lines changed: 8 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -7,82 +7,18 @@ env:
77
CARGO_TERM_COLOR: always
88

99
jobs:
10-
rust-unit-tests:
11-
name: Rust Unit Tests
10+
tests:
11+
name: Tests
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout repository
1515
uses: actions/checkout@v4
1616

17-
- name: Set up Rust
18-
uses: dtolnay/rust-toolchain@stable
17+
- name: Set up Docker Buildx
18+
uses: docker/setup-buildx-action@v3
1919

20-
- name: Run unit tests
21-
run: cargo test --workspace
22-
23-
- name: Run doc tests
24-
run: cargo test --workspace --doc
25-
26-
build:
27-
name: Build
28-
runs-on: ubuntu-latest
29-
steps:
30-
- name: Checkout repository
31-
uses: actions/checkout@v4
32-
33-
- name: Set up Rust
34-
uses: dtolnay/rust-toolchain@stable
35-
with:
36-
components: clippy
37-
38-
- name: Build release
39-
run: cargo build --release --workspace
40-
41-
- name: Clippy
42-
run: cargo clippy --workspace --all-targets -- -D warnings
43-
44-
functional-tests:
45-
name: Functional Tests
46-
runs-on: ubuntu-latest
47-
needs: build
48-
steps:
49-
- name: Checkout repository
50-
uses: actions/checkout@v4
51-
52-
- name: Set up Python
53-
uses: actions/setup-python@v5
54-
with:
55-
python-version: "3.11"
56-
57-
- name: Install Python dependencies
58-
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/
82-
continue-on-error: true
83-
84-
- name: Collect functional tests (dry run)
85-
if: steps.check_kvm.outputs.kvm_available == 'false'
20+
- name: Run tests with devtool
21+
env:
22+
PYTEST_ADDOPTS: "-n 2"
8623
run: |
87-
cd tests
88-
pytest --collect-only -m 'not nonci and not no_block_pr' integration_tests/functional/
24+
./tools/devtool -y test -- integration_tests/functional/

0 commit comments

Comments
 (0)