-
Notifications
You must be signed in to change notification settings - Fork 54
67 lines (61 loc) · 1.9 KB
/
test_integration.yaml
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
name: Integration testing
on:
pull_request:
branches:
- "*"
push:
tags:
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
branches:
- main
repository_dispatch:
types: [ok-to-test-command]
schedule:
- cron: "0 8 * * *"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
define-matrix:
uses: ./.github/workflows/matrix.yaml
# Branch-based pull request
integration-trusted:
needs: define-matrix
strategy:
fail-fast: false
matrix:
os: ${{ fromJSON(needs.define-matrix.outputs.os) }}
python-version: ${{ fromJSON(needs.define-matrix.outputs.python) }}
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
uses: ./.github/workflows/test_trusted.yaml
with:
runs-on: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}
python-env: integration
hatch-run: integration:test
secrets: inherit
# Repo owner has commented /ok-to-test on a (fork-based) pull request
integration-fork:
needs: define-matrix
strategy:
fail-fast: true
matrix:
os: ${{ fromJSON(needs.define-matrix.outputs.os) }}
python-version: ${{ fromJSON(needs.define-matrix.outputs.python) }}
permissions:
pull-requests: write
checks: write
if: |
github.event_name == 'repository_dispatch' &&
github.event.client_payload.slash_command.args.named.sha != '' &&
contains(
github.event.client_payload.pull_request.head.sha,
github.event.client_payload.slash_command.args.named.sha
)
uses: ./.github/workflows/test_fork.yaml
with:
runs-on: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}
python-env: integration
hatch-run: integration:test
secrets: inherit