-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
104 lines (97 loc) · 3.36 KB
/
canary.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
name: 'Canary Tests'
on:
schedule:
# Run every day at midnight
- cron: '0 0 * * *'
workflow_dispatch:
inputs:
commit:
description: If the commit you want to test isn't the head of a branch, provide its SHA here
required: false
env:
HEAD_COMMIT: ${{ github.event.inputs.commit || github.sha }}
permissions:
contents: read
issues: write
jobs:
job_canary_test:
name: Canary Tests
runs-on: ubuntu-20.04
timeout-minutes: 60
steps:
- name: 'Check out current commit'
uses: actions/checkout@v3
with:
ref: ${{ env.HEAD_COMMIT }}
- uses: pnpm/action-setup@v2
with:
version: 8.3.1
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version-file: 'package.json'
- name: Install dependencies
run: yarn install --ignore-engines --frozen-lockfile
- name: Build packages
run: yarn build
- name: Get node version
id: versions
run: |
echo "echo node=$(jq -r '.volta.node' package.json)" >> $GITHUB_OUTPUT
- name: Run Canary Tests
env:
E2E_TEST_PUBLISH_SCRIPT_NODE_VERSION: ${{ steps.versions.outputs.node }}
E2E_TEST_AUTH_TOKEN: ${{ secrets.E2E_TEST_AUTH_TOKEN }}
E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }}
E2E_TEST_SENTRY_ORG_SLUG: 'sentry-javascript-sdks'
E2E_TEST_SENTRY_TEST_PROJECT: 'sentry-javascript-e2e-tests'
CANARY_E2E_TEST: 'yes'
run: |
cd packages/e2e-tests
yarn test:e2e
- name: Create Issue
if: failure() && github.event_name == 'schedule'
uses: JasonEtco/create-an-issue@e27dddc79c92bc6e4562f268fffa5ed752639abd
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RUN_LINK: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
with:
filename: .github/CANARY_FAILURE_TEMPLATE.md
update_existing: true
job_ember_canary_test:
name: Ember Canary Tests
runs-on: ubuntu-20.04
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
scenario: [ember-release, embroider-optimized, ember-4.0]
steps:
- name: 'Check out current commit'
uses: actions/checkout@v3
with:
ref: ${{ env.HEAD_COMMIT }}
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version-file: 'package.json'
- name: Install dependencies
run: yarn install --ignore-engines --frozen-lockfile
- name: Build dependencies
run: |
yarn lerna run build:types --scope=@sentry/ember --include-dependencies
yarn lerna run build:transpile --scope=@sentry/ember --include-dependencies
- name: Run Ember tests
run: |
cd packages/ember
yarn ember try:one ${{ matrix.scenario }} --skip-cleanup=true
- name: Create Issue
if: failure() && github.event_name == 'schedule'
uses: JasonEtco/create-an-issue@e27dddc79c92bc6e4562f268fffa5ed752639abd
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RUN_LINK: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
with:
filename: .github/CANARY_FAILURE_TEMPLATE.md
update_existing: true
title: 'Ember Canary tests failed'