|
1 | | -name: "integration tests" |
| 1 | +name: Integration Tests |
| 2 | + |
2 | 3 | on: |
3 | 4 | pull_request: |
4 | 5 | paths-ignore: |
5 | | - - '**.md' |
| 6 | + - "**.md" |
6 | 7 | push: |
7 | 8 | branches: |
8 | 9 | - master |
| 10 | + - release/** |
| 11 | + paths-ignore: |
| 12 | + - "**.md" |
| 13 | + |
9 | 14 | env: |
10 | 15 | # Variables defined in the repository |
11 | 16 | SENTRY_ORG: ${{ vars.SENTRY_ORG }} |
12 | | - # For master we have an environment variable that selects the action-release project |
| 17 | + # For master, we have an environment variable that selects the action-release project |
13 | 18 | # instead of action-release-prs |
14 | 19 | # For other branches: https://sentry-ecosystem.sentry.io/releases/?project=4505075304693760 |
15 | 20 | # For master branch: https://sentry-ecosystem.sentry.io/releases/?project=6576594 |
16 | 21 | SENTRY_PROJECT: ${{ vars.SENTRY_PROJECT }} |
17 | 22 |
|
18 | 23 | jobs: |
| 24 | + lint: |
| 25 | + runs-on: ubuntu-latest |
| 26 | + |
| 27 | + steps: |
| 28 | + - uses: actions/checkout@v4 |
| 29 | + |
| 30 | + - name: Install |
| 31 | + run: yarn install |
| 32 | + |
| 33 | + - name: Check format |
| 34 | + run: yarn format-check |
| 35 | + |
| 36 | + - name: Lint |
| 37 | + run: yarn lint |
| 38 | + |
| 39 | + - name: Build |
| 40 | + run: yarn build |
| 41 | + |
19 | 42 | # You're welcome to make changes on this job as part of your PR in order to test out your changes |
20 | 43 | # We can always undo the changes once we're satisfied with the results |
21 | 44 | # |
22 | 45 | # Secrets on this repo do not get shared with PRs opened on a fork, thus, |
23 | 46 | # add SENTRY_AUTH_TOKEN as a secret to your fork if you want to use this job. |
24 | | - # Checkout the README.md on how to create the internal integration (read: auth token) |
25 | | - create-real-release-per-push: |
26 | | - name: "Test current action" |
27 | | - runs-on: ubuntu-latest |
28 | | - # XXX: This job will fail for forks, skip step on forks and let contributors tweak it when ready |
29 | | - if: github.ref != 'refs/heads/master' |
| 47 | + create-staging-release-per-push: |
| 48 | + strategy: |
| 49 | + matrix: |
| 50 | + os: [ ubuntu-latest, windows-latest, macos-latest ] |
| 51 | + runs-on: ${{ matrix.os }} |
| 52 | + name: Test current action |
30 | 53 | steps: |
31 | | - - uses: actions/checkout@v3 |
32 | | - with: |
33 | | - fetch-depth: 0 |
34 | | - # For PRs, this supports creating a release using the commits from the branch (rather than the merge commit) |
35 | | - ref: ${{ github.event.pull_request.head.sha || github.sha }} |
36 | | - |
37 | | - # This allows executing the action's code in the next step rather than a specific tag |
38 | | - - uses: './.github/actions/use-local-dockerfile' |
| 54 | + - uses: actions/checkout@v4 |
39 | 55 |
|
40 | | - - name: Create a staging release |
41 | | - uses: ./ |
42 | | - env: |
43 | | - # If you want this step to be mocked you can uncomment this variable |
44 | | - # MOCK: true |
45 | | - SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} |
46 | | - SENTRY_LOG_LEVEL: debug |
47 | | - with: |
48 | | - ignore_missing: true |
| 56 | + - name: Create a staging release |
| 57 | + uses: ./ |
| 58 | + env: |
| 59 | + SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} |
| 60 | + SENTRY_LOG_LEVEL: debug |
| 61 | + with: |
| 62 | + ignore_missing: true |
49 | 63 |
|
50 | | - mock-release: # Make sure that the action works on a clean machine without building Docker |
51 | | - name: "Build image & mock a release" |
52 | | - runs-on: ubuntu-latest |
| 64 | + mock-release: |
| 65 | + strategy: |
| 66 | + matrix: |
| 67 | + os: [ ubuntu-latest, windows-latest, macos-latest ] |
| 68 | + runs-on: ${{ matrix.os }} |
| 69 | + name: Mock a release |
53 | 70 | steps: |
54 | | - - uses: actions/checkout@v3 |
55 | | - |
56 | | - - uses: './.github/actions/use-local-dockerfile' |
| 71 | + - uses: actions/checkout@v4 |
57 | 72 |
|
58 | | - - name: Mock creating a Sentry release |
59 | | - uses: ./ |
60 | | - env: |
61 | | - MOCK: true |
62 | | - with: |
63 | | - environment: production |
| 73 | + - name: Mock creating a Sentry release |
| 74 | + uses: ./ |
| 75 | + env: |
| 76 | + MOCK: true |
| 77 | + with: |
| 78 | + environment: production |
64 | 79 |
|
65 | 80 | mock-release-working-directory: |
66 | | - name: "Build image & mock a release in a different working directory" |
67 | | - runs-on: ubuntu-latest |
| 81 | + strategy: |
| 82 | + matrix: |
| 83 | + os: [ ubuntu-latest, windows-latest, macos-latest ] |
| 84 | + runs-on: ${{ matrix.os }} |
| 85 | + name: Mock a release in a different working directory |
68 | 86 | steps: |
69 | | - - name: Checkout directory we'll be running from |
70 | | - uses: actions/checkout@v3 |
71 | | - with: |
72 | | - path: main/ |
73 | | - |
74 | | - - name: Checkout directory we'll be testing |
75 | | - uses: actions/checkout@v3 |
76 | | - with: |
77 | | - path: test/ |
| 87 | + - name: Checkout directory we'll be running from |
| 88 | + uses: actions/checkout@v4 |
| 89 | + with: |
| 90 | + path: main/ |
78 | 91 |
|
79 | | - - uses: './main/.github/actions/use-local-dockerfile' |
80 | | - with: |
81 | | - working_directory: main |
| 92 | + - name: Checkout directory we'll be testing |
| 93 | + uses: actions/checkout@v4 |
| 94 | + with: |
| 95 | + path: test/ |
82 | 96 |
|
83 | | - - name: Mock creating a Sentry release in a different directory |
84 | | - uses: ./main |
85 | | - env: |
86 | | - MOCK: true |
87 | | - with: |
88 | | - environment: production |
89 | | - working_directory: ./test |
| 97 | + - name: Mock creating a Sentry release in a different directory |
| 98 | + uses: ./main |
| 99 | + env: |
| 100 | + MOCK: true |
| 101 | + with: |
| 102 | + environment: production |
| 103 | + working_directory: ../test |
0 commit comments