Skip to content

Commit d851bbb

Browse files
authored
ci: extract all time zone testing, into a separate time_ci.yml (#19563)
1 parent d30cbdb commit d851bbb

File tree

3 files changed

+58
-26
lines changed

3 files changed

+58
-26
lines changed

.github/workflows/linux_ci.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,6 @@ jobs:
5555
run: ./v test-self
5656
# - name: Self tests (-cstrict)
5757
# run: V_CI_CSTRICT=1 ./v -cstrict test-self
58-
- name: Test time functions in a timezone UTC-12
59-
run: TZ=Etc/GMT+12 ./v test vlib/time/
60-
- name: Test time functions in a timezone UTC-3
61-
run: TZ=Etc/GMT+3 ./v test vlib/time/
62-
- name: Test time functions in a timezone UTC+3
63-
run: TZ=Etc/GMT-3 ./v test vlib/time/
64-
- name: Test time functions in a timezone UTC+12
65-
run: TZ=Etc/GMT-12 ./v test vlib/time/
66-
- name: Test time functions in a timezone using daylight saving (Europe/Paris)
67-
run: TZ=Europe/Paris ./v test vlib/time/
6858
- name: Build examples
6959
run: ./v -W build-examples
7060
- name: Build v tools

.github/workflows/time_ci.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Time CI
2+
3+
on:
4+
push:
5+
paths-ignore:
6+
- '**.md'
7+
- '**.yml'
8+
- '!**/time_ci.yml'
9+
pull_request:
10+
paths-ignore:
11+
- '**.md'
12+
- '**.yml'
13+
- '!**/time_ci.yml'
14+
15+
concurrency:
16+
group: time-ci-${{ github.event.pull_request.number || github.sha }}
17+
cancel-in-progress: true
18+
19+
jobs:
20+
test-nix:
21+
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
22+
strategy:
23+
matrix:
24+
os: [ubuntu-20.04, macos-12]
25+
fail-fast: false
26+
runs-on: ${{ matrix.os }}
27+
steps:
28+
- uses: actions/checkout@v4
29+
- name: Build V
30+
run: make -j4
31+
- name: Test time functions in a timezone UTC-12
32+
run: TZ=Etc/GMT+12 ./v test vlib/time/
33+
- name: Test time functions in a timezone UTC-3
34+
run: TZ=Etc/GMT+3 ./v test vlib/time/
35+
- name: Test time functions in a timezone UTC+3
36+
run: TZ=Etc/GMT-3 ./v test vlib/time/
37+
- name: Test time functions in a timezone UTC+12
38+
run: TZ=Etc/GMT-12 ./v test vlib/time/
39+
- name: Test time functions in a timezone using daylight saving (Europe/Paris)
40+
run: TZ=Europe/Paris ./v test vlib/time/
41+
42+
test-windows:
43+
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
44+
runs-on: windows-2019
45+
steps:
46+
- uses: actions/checkout@v4
47+
- name: Build V
48+
run: .\make.bat
49+
- name: Test time functions in a timezone UTC-12
50+
run: tzutil /s "Dateline Standard Time" && ./v test vlib/time/
51+
- name: Test time functions in a timezone UTC-3
52+
run: tzutil /s "Greenland Standard Time" && ./v test vlib/time/
53+
- name: Test time functions in a timezone UTC+3
54+
run: tzutil /s "Russian Standard Time" && ./v test vlib/time/
55+
- name: Test time functions in a timezone UTC+12
56+
run: tzutil /s "New Zealand Standard Time" && ./v test vlib/time/
57+
- name: Test time functions in a timezone using daylight saving (Europe/Paris)
58+
run: tzutil /s "W. Europe Standard Time" && ./v test vlib/time/

.github/workflows/windows_ci.yml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -43,22 +43,6 @@ jobs:
4343
# run: .\v.exe test-all
4444
- name: Build option_test.v with -autofree
4545
run: .\v.exe -autofree vlib/v/tests/option_test.v
46-
- name: Test time functions in a timezone UTC-12
47-
run: |
48-
tzutil /s "Dateline Standard Time"
49-
./v test vlib/time/
50-
- name: Test time functions in a timezone UTC-3
51-
run: |
52-
tzutil /s "Greenland Standard Time"
53-
./v test vlib/time/
54-
- name: Test time functions in a timezone UTC+3
55-
run: |
56-
tzutil /s "Russian Standard Time"
57-
./v test vlib/time/
58-
- name: Test time functions in a timezone UTC+12
59-
run: |
60-
tzutil /s "New Zealand Standard Time"
61-
./v test vlib/time/
6246
- name: Test v->js
6347
run: ./v -o hi.js examples/hello_v_js.v && node hi.js
6448
- name: Test v binaries

0 commit comments

Comments
 (0)