-
Notifications
You must be signed in to change notification settings - Fork 6k
108 lines (106 loc) · 4.01 KB
/
node_compat_test.yml
File metadata and controls
108 lines (106 loc) · 4.01 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
97
98
99
100
101
102
103
104
105
106
107
108
name: node_compat_test
on:
schedule:
- cron: '0 10 * * 1-5'
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@v6
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@v6
with:
python-version: 3.11
- name: Authenticate with Google Cloud
if: github.ref == 'refs/heads/main'
uses: google-github-actions/auth@v3
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@v3
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'
env:
AWS_ACCESS_KEY_ID: ${{ vars.S3_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET_ACCESS_KEY }}
AWS_ENDPOINT_URL_S3: ${{ vars.S3_ENDPOINT }}
AWS_DEFAULT_REGION: ${{vars.S3_REGION }}
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
aws s3 cp tests/node_compat/report.json.gz s3://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@v6
with:
submodules: true
- name: Setup Deno
uses: denoland/setup-deno@v2
- name: Install Python
uses: actions/setup-python@v6
with:
python-version: 3.11
- name: Authenticate with Google Cloud
uses: google-github-actions/auth@v3
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@v3
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
env:
AWS_ACCESS_KEY_ID: ${{ vars.S3_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET_ACCESS_KEY }}
AWS_ENDPOINT_URL_S3: ${{ vars.S3_ENDPOINT }}
AWS_DEFAULT_REGION: ${{vars.S3_REGION }}
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
aws s3 cp tests/node_compat/summary.json.gz s3://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