v / .github / workflows / time_ci.yml
73 lines · 68 sloc · 2.45 KB · 93162641ddda0809e8e8c2da69af8b13982567ee
Raw
1name: Time CI
2
3on:
4 push:
5 branches:
6 - master
7 paths:
8 - 'vlib/**'
9 - 'cmd/tools/builders/**.v'
10 - '**/time_ci.yml'
11 - '!**.md'
12 pull_request:
13 paths:
14 - 'vlib/**'
15 - 'cmd/tools/builders/**.v'
16 - '**/time_ci.yml'
17 - '!**.md'
18
19concurrency:
20 group: time-${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.sha || github.ref }}
21 cancel-in-progress: true
22
23jobs:
24 time-linux:
25 runs-on: ubuntu-latest
26 steps:
27 - uses: actions/checkout@v6
28 - name: Build V
29 run: make
30 - name: Test time functions in a timezone UTC-12
31 run: TZ=Etc/GMT+12 ./v test vlib/time/
32 - name: Test time functions in a timezone UTC-3
33 run: TZ=Etc/GMT+3 ./v test vlib/time/
34 - name: Test time functions in a timezone UTC+3
35 run: TZ=Etc/GMT-3 ./v test vlib/time/
36 - name: Test time functions in a timezone UTC+12
37 run: TZ=Etc/GMT-12 ./v test vlib/time/
38 - name: Test in a timezone using daylight saving (Europe/Paris)
39 run: TZ=Europe/Paris ./v test vlib/time/
40
41 time-macos:
42 runs-on: macos-14
43 steps:
44 - uses: actions/checkout@v6
45 - name: Build V
46 run: make
47 - name: Test time functions in a timezone UTC-12
48 run: TZ=Etc/GMT+12 ./v test vlib/time/
49 - name: Test time functions in a timezone UTC-3
50 run: TZ=Etc/GMT+3 ./v test vlib/time/
51 - name: Test time functions in a timezone UTC+3
52 run: TZ=Etc/GMT-3 ./v test vlib/time/
53 - name: Test time functions in a timezone UTC+12
54 run: TZ=Etc/GMT-12 ./v test vlib/time/
55 - name: Test in a timezone using daylight saving (Europe/Paris)
56 run: TZ=Europe/Paris ./v test vlib/time/
57
58 time-windows:
59 runs-on: windows-2025
60 steps:
61 - uses: actions/checkout@v6
62 - name: Build V
63 run: .\makev.bat
64 - name: Test time functions in a timezone UTC-12
65 run: tzutil /s "Dateline Standard Time" && ./v test vlib/time/
66 - name: Test time functions in a timezone UTC-3
67 run: tzutil /s "Greenland Standard Time" && ./v test vlib/time/
68 - name: Test time functions in a timezone UTC+3
69 run: tzutil /s "Russian Standard Time" && ./v test vlib/time/
70 - name: Test time functions in a timezone UTC+12
71 run: tzutil /s "New Zealand Standard Time" && ./v test vlib/time/
72 - name: Test in a timezone using daylight saving (Europe/Paris)
73 run: tzutil /s "W. Europe Standard Time" && ./v test vlib/time/
74