Skip to content

Commit e3c5252

Browse files
authored
ci: run checks on PRs to feat/** and test vmm UI and vmm-cli (#1559)
* ci: run checks on PRs to feat/** and test vmm UI and vmm-cli PRs targeting feature branches only got the Foundry checks. Also fail the Rust job when cryptsetup is missing so the LUKS tests cannot silently skip. Signed-off-by: Kevin Wang <wy721@qq.com> * ci: check auth-eth-bun on feature branch PRs and fix the vmm-cli deps cryptography 50.0.0 needs cffi 2.0.0 or later, so requirements.txt could not be installed with cffi pinned to 1.17.1. The file exists on every branch, so install it unconditionally. Signed-off-by: Kevin Wang <wy721@qq.com> --------- Signed-off-by: Kevin Wang <wy721@qq.com>
1 parent c88f60e commit e3c5252

7 files changed

Lines changed: 44 additions & 9 deletions

File tree

‎.github/workflows/kms-auth-eth-bun.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ on:
2424
- 'dstack/kms/auth-eth-bun/**'
2525
- '.github/workflows/kms-auth-eth-bun.yml'
2626
pull_request:
27-
branches: [ next, 'release/**' ]
27+
branches: [ next, 'release/**', 'feat/**' ]
2828
paths:
2929
- 'dstack/kms/auth-eth-bun/**'
3030
- '.github/workflows/kms-auth-eth-bun.yml'

‎.github/workflows/prek-check.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
push:
99
branches: [ next, 'release/**' ]
1010
pull_request:
11-
branches: [ next, 'release/**' ]
11+
branches: [ next, 'release/**', 'feat/**' ]
1212

1313
permissions:
1414
contents: read

‎.github/workflows/rust.yml‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
push:
99
branches: [ next, 'release/**' ]
1010
pull_request:
11-
branches: [ next, 'release/**' ]
11+
branches: [ next, 'release/**', 'feat/**' ]
1212

1313
env:
1414
CARGO_TERM_COLOR: always
@@ -78,6 +78,12 @@ jobs:
7878
if: steps.changes.outputs.relevant == 'true'
7979
run: cargo fmt --check --all
8080

81+
# The LUKS tests in dstack-util skip and pass when cryptsetup is missing.
82+
# Fail here instead, so a runner without it cannot hide them.
83+
- name: Require cryptsetup
84+
if: steps.changes.outputs.relevant == 'true'
85+
run: cryptsetup --version
86+
8187
- name: Run tests
8288
if: steps.changes.outputs.relevant == 'true'
8389
run: ./run-tests.sh

‎.github/workflows/sdk.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
push:
1212
branches: [next, 'release/**']
1313
pull_request:
14-
branches: [next, 'release/**']
14+
branches: [next, 'release/**', 'feat/**']
1515

1616
env:
1717
CARGO_TERM_COLOR: always

‎.github/workflows/spdx-check.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
push:
99
branches: [ next, 'release/**' ]
1010
pull_request:
11-
branches: [ next, 'release/**' ]
11+
branches: [ next, 'release/**', 'feat/**' ]
1212

1313
jobs:
1414
reuse-lint:

‎.github/workflows/vmm-ui.yml‎

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,24 @@ name: VMM UI build
77
permissions:
88
contents: read
99

10-
# Only the VMM's web UI is built here. Not a required status check, so a
11-
# workflow-level filter is safe.
10+
# The VMM's web UI and vmm-cli are built and tested here. Not a required
11+
# status check, so a workflow-level filter is safe.
1212
on:
1313
push:
1414
branches: [ next, 'release/**' ]
1515
paths:
1616
- 'dstack/vmm/ui/**'
17+
- 'dstack/vmm/src/vmm-cli.py'
18+
- 'dstack/vmm/src/tests/test_vmm_cli.py'
19+
- 'dstack/vmm/requirements.txt'
1720
- '.github/workflows/vmm-ui.yml'
1821
pull_request:
19-
branches: [ next, 'release/**' ]
22+
branches: [ next, 'release/**', 'feat/**' ]
2023
paths:
2124
- 'dstack/vmm/ui/**'
25+
- 'dstack/vmm/src/vmm-cli.py'
26+
- 'dstack/vmm/src/tests/test_vmm_cli.py'
27+
- 'dstack/vmm/requirements.txt'
2228
- '.github/workflows/vmm-ui.yml'
2329

2430
jobs:
@@ -47,3 +53,26 @@ jobs:
4753
git status --porcelain
4854
exit 1
4955
fi
56+
57+
# `--if-present`: the UI test script is not on every branch yet.
58+
- name: Test vmm UI
59+
run: npm run test --if-present
60+
working-directory: dstack/vmm/ui
61+
62+
vmm-cli:
63+
runs-on: ${{ vars.CI_RUNNER || 'ubuntu-latest' }}
64+
steps:
65+
- uses: actions/checkout@v5
66+
67+
- name: Install Python
68+
uses: actions/setup-python@v5
69+
with:
70+
python-version: '3.12'
71+
72+
- name: Install vmm-cli dependencies
73+
run: pip install -r requirements.txt
74+
working-directory: dstack/vmm
75+
76+
- name: Test vmm-cli
77+
run: python3 -m unittest -v tests/test_vmm_cli.py
78+
working-directory: dstack/vmm/src

‎dstack/vmm/requirements.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
annotated-types==0.7.0
2-
cffi==1.17.1
2+
cffi==2.0.0
33
cryptography==50.0.0
44
cytoolz==1.0.1
55
eth-hash==0.7.1

0 commit comments

Comments
 (0)