-
-
Notifications
You must be signed in to change notification settings - Fork 6
84 lines (76 loc) · 2.95 KB
/
workflow-tests.yml
File metadata and controls
84 lines (76 loc) · 2.95 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
# This isn't a reusable workflow but an actual CI action for this repo itself - to test the workflows.
name: Workflow Tests
on:
push:
permissions:
contents: read
pull-requests: write
issues: write
jobs:
updater-create-pr:
runs-on: ubuntu-latest
outputs:
prUrl: ${{ steps.updater.outputs.prUrl }}
baseBranch: ${{ steps.updater.outputs.baseBranch }}
prBranch: ${{ steps.updater.outputs.prBranch }}
originalTag: ${{ steps.updater.outputs.originalTag }}
latestTag: ${{ steps.updater.outputs.latestTag }}
steps:
- uses: actions/checkout@v4
- name: Run updater action
id: updater
uses: ./updater
with:
path: updater/tests/sentry-cli.properties
name: WORKFLOW-TEST-DEPENDENCY-DO-NOT-MERGE
pattern: '^2\.0\.'
pr-strategy: update
api-token: ${{ github.token }}
updater-test-args:
runs-on: macos-latest
outputs:
prUrl: ${{ steps.updater.outputs.prUrl }}
baseBranch: ${{ steps.updater.outputs.baseBranch }}
prBranch: ${{ steps.updater.outputs.prBranch }}
originalTag: ${{ steps.updater.outputs.originalTag }}
latestTag: ${{ steps.updater.outputs.latestTag }}
steps:
- uses: actions/checkout@v4
- name: Run updater action
id: updater
uses: ./updater
with:
path: updater/tests/workflow-args.sh
name: Workflow args test script
pattern: '.*'
api-token: ${{ github.token }}
updater-test-outputs:
runs-on: ubuntu-latest
needs:
- updater-create-pr
- updater-test-args
steps:
- run: "[[ '${{ needs.updater-create-pr.outputs.baseBranch }}' == 'main' ]]"
- run: "[[ '${{ needs.updater-create-pr.outputs.originalTag }}' == '2.0.0' ]]"
- run: "[[ '${{ needs.updater-create-pr.outputs.latestTag }}' =~ ^[0-9.]+$ ]]"
- run: "[[ '${{ needs.updater-create-pr.outputs.prUrl }}' =~ ^https://github.com/getsentry/github-workflows/pull/[0-9]+$ ]]"
- run: "[[ '${{ needs.updater-create-pr.outputs.prBranch }}' == 'deps/updater/tests/sentry-cli.properties' ]]"
- run: "[[ '${{ needs.updater-test-args.outputs.baseBranch }}' == '' ]]"
- run: "[[ '${{ needs.updater-test-args.outputs.originalTag }}' == 'latest' || '${{ needs.updater-test-args.outputs.originalTag }}' =~ ^v?[0-9]+\\.[0-9]+\\.[0-9]+$ ]]"
- run: "[[ '${{ needs.updater-test-args.outputs.originalTag }}' == '${{ needs.updater-test-args.outputs.latestTag }}' ]]"
- run: "[[ '${{ needs.updater-test-args.outputs.prUrl }}' == '' ]]"
- run: "[[ '${{ needs.updater-test-args.outputs.prBranch }}' == '' ]]"
cli-integration:
runs-on: ${{ matrix.host }}-latest
strategy:
fail-fast: false
matrix:
host:
- ubuntu
- macos
- windows
steps:
- uses: actions/checkout@v4
- uses: ./sentry-cli/integration-test/
with:
path: sentry-cli/integration-test/tests/