|
| 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/ |
0 commit comments