Skip to content

Commit

Permalink
Set timezone in CI
Browse files Browse the repository at this point in the history
This seems like it was probably the cause of several time-of-day-specific test failures. Setting it (temporarily, I hope) in CI should probably mean we can keep testing WebKit (which isn’t otherwise affected by e.g. the `TZ` environment variable like the other browsers)
  • Loading branch information
eyelidlessness committed Oct 16, 2023
1 parent c67f52e commit 7b214ac
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ defaults:
run:
shell: bash

env:
TZ: 'America/Phoenix'

jobs:
changes:
runs-on: 'ubuntu-latest'
Expand Down Expand Up @@ -95,9 +98,14 @@ jobs:
packages/tree-sitter-xpath/types
key: build-${{ matrix.node-version }}-${{ github.sha }}

- if: steps.cache-install.outputs.cache-hit != 'true'
run: 'yarn install --frozen-lockfile'
# `@odk/xpath` tests (currently) expect this time zone
- uses: szenius/[email protected]
with:
timezoneLinux: ${{ env.TZ }}
timezoneMacos: ${{ env.TZ }}
timezoneWindows: ${{ env.TZ }}

- run: 'yarn install --frozen-lockfile'
- run: 'yarn build --force'

lint:
Expand Down Expand Up @@ -226,6 +234,12 @@ jobs:
key: build-${{ matrix.node-version }}-${{ github.sha }}
fail-on-cache-miss: true

- uses: szenius/[email protected]
with:
timezoneLinux: ${{ env.TZ }}
timezoneMacos: ${{ env.TZ }}
timezoneWindows: ${{ env.TZ }}

- run: 'yarn playwright install chromium firefox webkit && yarn playwright install-deps'
# TODO: Browser/Node matrix
- run: 'yarn workspace @odk/xpath test'
Expand Down

0 comments on commit 7b214ac

Please sign in to comment.