Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: update timezone to 2022f #4

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions .github/workflows/timezone-update.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Timezone update
on:
schedule:
# Run once a week at 00:05 AM UTC on Sunday.
- cron: 5 0 * * 0
push:
branches:
- test/add-a-test-to-ensure-the-correctness-of-timezone-upgrades

workflow_dispatch:

Expand All @@ -15,7 +15,6 @@ jobs:
contents: write # to push local changes (gr2m/create-or-update-pull-request-action)
pull-requests: write # to create a PR (gr2m/create-or-update-pull-request-action)

if: github.repository == 'nodejs/node'
runs-on: ubuntu-latest

steps:
Expand All @@ -36,10 +35,13 @@ jobs:

- run: ./tools/update-timezone.mjs

- name: Update the expected timezone version in test
run: echo "${{ env.new_version }}" > test/fixtures/tz-version.txt

- name: Open Pull Request
uses: gr2m/create-or-update-pull-request-action@dc1726cbf4dd3ce766af4ec29cfb660e0125e8ee # Create a PR or update the Action's existing PR
env:
GITHUB_TOKEN: ${{ secrets.GH_USER_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
author: Node.js GitHub Bot <[email protected]>
body: |
Expand All @@ -51,8 +53,7 @@ jobs:
```js
console.log(process.versions.tz)
```
branch: actions/timezone-update
branch: test/add-a-test-to-ensure-the-correctness-of-timezone-upgrades
commit-message: 'deps: update timezone to ${{ env.new_version }}'
labels: dependencies
title: 'deps: update timezone to ${{ env.new_version }}'
reviewers: \@nodejs/i18n-api
Binary file modified deps/icu-small/source/data/in/icudt72l.dat.bz2
Binary file not shown.
1 change: 1 addition & 0 deletions test/fixtures/tz-version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2022f
12 changes: 12 additions & 0 deletions test/parallel/test-tz-version.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
'use strict';

require('../common');
const { path } = require('../common/fixtures');

// This test ensures the correctness of the automated timezone upgrade PRs.

const { strictEqual } = require('assert');
const { readFileSync } = require('fs');

const expectedVersion = readFileSync(path('tz-version.txt'), 'utf8').trim();
strictEqual(process.versions.tz, expectedVersion);