Skip to content

Commit 024cd26

Browse files
committed
tools: automate updates for test/fixtures/test426
1 parent 37d9cfc commit 024cd26

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: test426 fixtures update
2+
3+
on:
4+
schedule:
5+
- cron: 0 0 * * 0
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
update-test426-fixtures:
13+
if: github.repository == 'nodejs/node' || github.event_name == 'workflow_dispatch'
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
17+
with:
18+
persist-credentials: false
19+
20+
- name: Update test426 fixtures from tc39/source-map-tests
21+
run: bash tools/dep_updaters/update-test426-fixtures.sh
22+
23+
- name: Open or update PR for test426 fixtures
24+
uses: gr2m/create-or-update-pull-request-action@77596e3166f328b24613f7082ab30bf2d93079d5
25+
with:
26+
branch: actions/update-test426-fixtures
27+
author: Node.js GitHub Bot <github-bot@iojs.org>
28+
title: 'test: update test426 fixtures from tc39/source-map-tests'
29+
commit-message: 'test: update test426 fixtures from tc39/source-map-tests'
30+
labels: test
31+
update-pull-request-title-and-body: true
32+
body: |
33+
This is an automated update of the test426 fixtures from https://github.com/tc39/source-map-tests.
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GH_USER_TOKEN }}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/sh
2+
3+
set -e
4+
5+
REPO_URL="https://github.com/tc39/source-map-tests.git"
6+
TARGET_DIR="$(dirname "$0")/../../test/fixtures/test426"
7+
TMP_DIR="$(mktemp -d)"
8+
9+
git clone --depth=1 "$REPO_URL" "$TMP_DIR"
10+
11+
rsync -a --delete --exclude='.git' "$TMP_DIR"/ "$TARGET_DIR"/
12+
13+
rm -rf "$TMP_DIR"
14+
15+
echo "test426 fixtures updated from $REPO_URL."

0 commit comments

Comments
 (0)