Skip to content

Commit e68fab8

Browse files
authored
ci: fix CI=name ./v -d network test cmd/tools/vpm/ ; update the image runners in vpm_ci.yml (#23628)
1 parent b8c7892 commit e68fab8

4 files changed

Lines changed: 25 additions & 21 deletions

File tree

‎.github/workflows/vpm_ci.yml‎

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,18 @@ concurrency:
1515
cancel-in-progress: true
1616

1717
jobs:
18-
setup:
18+
setup-vpm:
1919
strategy:
2020
matrix:
21-
os: [ubuntu-20.04, windows-2019, macos-14]
21+
os: [ubuntu-latest, windows-latest, macos-latest]
2222
fail-fast: false
2323
runs-on: ${{ matrix.os }}
2424
steps:
2525
- uses: actions/checkout@v4
2626
with:
2727
path: vlang
28+
- name: Show git version
29+
run: git version
2830
- name: Build V
2931
if: runner.os != 'Windows'
3032
run: cd vlang && make -j4 && ./v doctor
@@ -37,34 +39,34 @@ jobs:
3739
path: vlang
3840
key: ${{ runner.os }}-${{ github.sha }}
3941

40-
test:
41-
needs: setup
42+
test-vpm:
43+
needs: setup-vpm
4244
strategy:
4345
matrix:
4446
include:
45-
- os: ubuntu-20.04
47+
- os: ubuntu-latest
4648
cc: tcc
47-
- os: ubuntu-20.04
49+
- os: ubuntu-latest
4850
cc: gcc
49-
- os: ubuntu-20.04
51+
- os: ubuntu-latest
5052
cc: clang
51-
- os: windows-2019
53+
- os: macos-latest
54+
cc: clang
55+
- os: windows-latest
5256
cc: tcc
53-
- os: windows-2019
57+
- os: windows-latest
5458
cc: gcc
55-
- os: windows-2019
59+
- os: windows-latest
5660
cc: msvc
57-
- os: macos-14
58-
cc: clang
5961
fail-fast: false
6062
runs-on: ${{ matrix.os }}
61-
env:
62-
VFLAGS: -cc ${{ matrix.cc }} -d network
6363
steps:
6464
- name: Restore V cache
6565
uses: actions/cache/restore@v4
6666
with:
6767
path: vlang
6868
key: ${{ runner.os }}-${{ github.sha }}
69+
- name: Show git version
70+
run: git version
6971
- name: Test
70-
run: cd vlang && ./v test cmd/tools/vpm
72+
run: cd vlang && ./v -cc ${{ matrix.cc }} -d network test cmd/tools/vpm

‎cmd/tools/vpm/install_test.v‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ fn test_get_installed_version() {
146146

147147
// Create a tag -> latests commit and tag are at the same state,
148148
// but it should not be treated as a version installation, when there is another head branch.
149-
res = cmd_ok(@LOCATION, 'git tag v0.1.0')
149+
res = cmd_ok(@LOCATION, 'git tag v0.1.0 -m "some tag message"') // note: without a tag message, git will try to start an editor when you run this test locally, which will block
150150
mod.is_installed = false
151151
mod.get_installed()
152152
assert mod.is_installed

‎cmd/tools/vpm/outdated_test.v‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,10 @@ fn test_outdated() {
5555
assert is_outdated(m)
5656
}
5757
res := cmd_ok(@LOCATION, '${vexe} outdated')
58-
assert res.output.contains('Outdated modules:'), res.output
59-
assert res.output.contains('pcre'), res.output
60-
assert res.output.contains('vtray'), res.output
61-
assert res.output.contains('nedpals.args'), res.output
62-
assert !res.output.contains('libsodium'), res.output
58+
output := res.output.all_after('Outdated modules:')
59+
assert output.len > 0, output
60+
assert output.contains('pcre'), output
61+
assert output.contains('vtray'), output
62+
assert output.contains('nedpals.args'), output
63+
assert !output.contains('libsodium'), output
6364
}

‎cmd/tools/vpm/settings.v‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ fn init_settings() VpmSettings {
3434
is_ci := os.getenv('CI') != ''
3535

3636
mut logger := &log.Log{}
37+
logger.set_output_stream(os.stderr())
3738
if is_dbg {
3839
logger.set_level(.debug)
3940
}

0 commit comments

Comments
 (0)