forked from denoland/deno
-
Notifications
You must be signed in to change notification settings - Fork 0
96 lines (94 loc) · 3.28 KB
/
node_compat_test.yml
File metadata and controls
96 lines (94 loc) · 3.28 KB
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
name: node_compat_test
on:
schedule:
- cron: '0 10 * * *'
workflow_dispatch:
jobs:
test:
runs-on: '${{ matrix.runner }}'
strategy:
matrix:
include:
- os: linux
runner: ubuntu-latest
- os: windows
runner: windows-latest
- os: darwin
runner: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Setup Rust
uses: dsherret/rust-toolchain-file@v1
- name: Setup Deno
uses: denoland/setup-deno@v2
with:
deno-version: canary
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Authenticate with Google Cloud
if: github.ref == 'refs/heads/main'
uses: google-github-actions/auth@v2
with:
project_id: denoland
credentials_json: '${{ secrets.GCP_SA_KEY }}'
export_environment_variables: true
create_credentials_file: true
- name: Setup gcloud
if: github.ref == 'refs/heads/main'
uses: google-github-actions/setup-gcloud@v2
with:
project_id: denoland
- name: Run tests
env:
# override using ldl in .cargo/config.toml
CARGO_ENCODED_RUSTFLAGS: ''
run: deno task --cwd tests/node_compat/runner test --report
- name: Gzip the report
run: gzip tests/node_compat/report.json
- name: Upload the report to dl.deno.land
if: github.ref == 'refs/heads/main'
run: |-
gsutil -h "Cache-Control: public, max-age=3600" cp tests/node_compat/report.json.gz gs://dl.deno.land/node-compat-test/$(date +%F)/report-${{matrix.os}}.json.gz
summary:
runs-on: ubuntu-latest
needs: test
if: ${{ always() && github.ref == 'refs/heads/main' }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Setup Deno
uses: denoland/setup-deno@v2
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Authenticate with Google Cloud
uses: google-github-actions/auth@v2
with:
project_id: denoland
credentials_json: '${{ secrets.GCP_SA_KEY }}'
export_environment_variables: true
create_credentials_file: true
- name: Setup gcloud
uses: google-github-actions/setup-gcloud@v2
with:
project_id: denoland
- name: Add the day summary to the month summary
run: deno -A --config tests/config/deno.json tests/node_compat/add_day_summary_to_month_summary.ts
- name: Gzip the month summary
run: gzip tests/node_compat/summary.json -k
- name: Upload the month summary
run: |-
gsutil -h "Cache-Control: public, max-age=3600" cp tests/node_compat/summary.json.gz gs://dl.deno.land/node-compat-test/summary-$(date +%Y-%m).json.gz
- name: Post message to slack channel
run: deno -A --config tests/config/deno.json tests/node_compat/slack.ts
env:
SLACK_TOKEN: ${{ secrets.NODE_COMPAT_SLACK_TOKEN }} # NodeCompat bot
SLACK_CHANNEL: ${{ secrets.NODE_COMPAT_SLACK_CHANNEL }} # #node-compat channel