Skip to content

Commit

Permalink
change: use env for setting timezone in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Mitsunee committed Nov 25, 2024
1 parent f7ec020 commit 6a929b9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ jobs:
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile --ignore-scripts
- name: Set Timezone # setting a non-UTC timezone for local date tests
run: sudo timedatectl set-timezone 'Europe/Berlin'
- name: Run Tests
run: pnpm test
- name: Set different Timezone # retesting date-related tests on other tz
run: sudo timedatectl set-timezone 'America/Los_Angeles'
- name: Rerun date-related tests
env:
TZ: Europe/Berlin
- name: Rerun date-related tests with different TZ
run: pnpm tsx tests/formatTime.test.ts
env:
TZ: America/Los_Angeles

0 comments on commit 6a929b9

Please sign in to comment.