-
Notifications
You must be signed in to change notification settings - Fork 6
89 lines (88 loc) · 2.46 KB
/
tests.yml
File metadata and controls
89 lines (88 loc) · 2.46 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
name: Tests
on:
push:
branches: [main]
pull_request:
types: [opened, synchronize, reopened]
jobs:
checks:
name: Run checks
runs-on: ubuntu-20.04
strategy:
matrix:
script:
- lint
- depcheck
- typecheck
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v3
with:
version: 8
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- name: Install dependencies
shell: bash
run: pnpm install --frozen-lockfile
- name: Run the script
run: pnpm run ${{ matrix.script }}
integration:
name: Test Sentry Integration
strategy:
matrix:
os:
- ubuntu-20.04
- ubuntu-22.04
- macos-11
- macos-12
- windows-2019
- windows-2022
version: [latest, 1.58.0]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Sentry CLI
uses: ./
with:
version: ${{ matrix.version }}
url: ${{ secrets.SENTRY_URL }}
token: ${{ secrets.SENTRY_TOKEN }}
organization: ${{ secrets.SENTRY_ORGANIZATION }}
project: ${{ secrets.SENTRY_PROJECT }}
- name: Display Sentry CLI info
run: |
sentry-cli --help
sentry-cli info
- name: Deploy Sentry release
if: matrix.os == 'ubuntu-20.04' && matrix.version == 'latest' # do not duplicate releases
run: |
VERSION=$(sentry-cli releases propose-version)
sentry-cli releases new "$VERSION"
sentry-cli releases set-commits "$VERSION" --auto || true
sentry-cli releases files "$VERSION" upload-sourcemaps ./dist \
--rewrite \
--ext map \
--validate \
--verbose \
--strip-common-prefix
sentry-cli releases finalize "$VERSION"
- name: Send Sentry test event
if: "!contains(matrix.os, 'win')"
run: |
sentry-cli send-event \
--release="$VERSION" \
--fingerprint="GH-DEMO" \
--message="Hello from GitHub Actions" \
--level=debug
env:
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}