-
Notifications
You must be signed in to change notification settings - Fork 5
106 lines (103 loc) · 3.23 KB
/
update-data.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: "Update Runtime Data"
on:
push:
branches:
- main
schedule:
- cron: "0 12 * * *"
workflow_dispatch:
pull_request:
permissions:
pull-requests: write
contents: write
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: lts/*
cache: "pnpm"
- uses: wasmerio/setup-wasmer@v3.1
- run: wasmer run wasmer/winterjs -- -V
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- uses: denoland/setup-deno@v1
with:
deno-version: vx.x.x
- name: Download Fastly CLI
uses: robinraju/release-downloader@v1.11
with:
repository: fastly/cli
latest: true
fileName: fastly_*_linux_amd64.deb
- name: Install Fastly CLI
run: sudo dpkg -i fastly_*_linux_amd64.deb && fastly version
- name: Download LLRT
uses: robinraju/release-downloader@v1.11
with:
repository: awslabs/llrt
latest: true
fileName: llrt-linux-x64.zip
out-file-path: downloads
# Manually unzip because this seems to corrupt the binary
extract: false
- name: Setup LLRT
run: |
export DOWNLOADS="$GITHUB_WORKSPACE/downloads"
unzip $DOWNLOADS/llrt-linux-x64.zip -d $DOWNLOADS
sudo chmod +x $DOWNLOADS/*
echo "$DOWNLOADS" >> $GITHUB_PATH
- run: pnpm install
- name: Get browser tests
uses: actions/checkout@v4
with:
repository: openwebdocs/mdn-bcd-collector
path: .bcd
fetch-depth: 0
- name: Switch to latest mdn-bcd-collector release
run: |
latestTag=$(git describe --tags "$(git rev-list --tags --max-count=1)")
git checkout $latestTag
working-directory: .bcd
- name: Prepare mdn-bcd-collector environment
run: npm install --ignore-scripts
working-directory: .bcd
- name: Generate runtime tests
run: npm run build
env:
NODE_ENV: production
working-directory: .bcd
- name: Generate compat data
timeout-minutes: 10
run: |
cp .bcd/tests.json vendor/tests.json
# Make diffs easier to read
pnpm prettier vendor/tests.json -w
pnpm generate
rm -rf .bcd
pnpm test
env:
WAIT_ON_TIMEOUT: 30000
- name: Get runtime versions
id: get-versions
run: node --no-warnings=ExperimentalWarning scripts/version.mjs >> "$GITHUB_OUTPUT"
- name: Create Pull Request
# only run when on main branch
if: github.ref == 'refs/heads/main'
uses: peter-evans/create-pull-request@v7
with:
add-paths: |
generator/runtimes/*/data.json
packages/runtime-compat-data/data.json
vendor/tests.json
title: "fix: update runtime compat data"
commit-message: "fix: update runtime compat data"
body: |
Updates the runtime compat data.
Runtime versions:
${{ steps.get-versions.outputs.versions }}
base: main