-
Notifications
You must be signed in to change notification settings - Fork 567
93 lines (84 loc) · 2.95 KB
/
pr.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
name: Pull Request
on:
pull_request:
types: [opened, synchronize]
branches:
- develop
- feat/*
- main
- release/v[0-9]+.[0-9]+.[0-9]+
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
modified-files:
runs-on: ubuntu-latest
outputs:
app-changes: ${{ steps.filter.outputs.app }}
e2e-changes: ${{ steps.filter.outputs.e2e-pw }}
fiftyone-changes: ${{ steps.filter.outputs.fiftyone }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
app:
- 'app/**'
e2e-pw:
- 'e2e-pw/**'
fiftyone:
- 'fiftyone/**'
- 'package/**'
- 'requirements/**'
- 'tests/**'
- 'requirements.txt'
- 'setup.py'
build:
needs: modified-files
if: ${{ needs.modified-files.outputs.app-changes == 'true' || needs.modified-files.outputs.fiftyone-changes == 'true' }}
uses: ./.github/workflows/build.yml
e2e:
needs: modified-files
if: ${{ needs.modified-files.outputs.app-changes == 'true' || needs.modified-files.outputs.e2e-changes == 'true' || needs.modified-files.outputs.fiftyone-changes == 'true' }}
uses: ./.github/workflows/e2e.yml
lint:
needs: modified-files
if: ${{ needs.modified-files.outputs.app-changes == 'true' || needs.modified-files.outputs.fiftyone-changes == 'true' }}
uses: ./.github/workflows/lint-app.yml
teams:
runs-on: ubuntu-latest
if: false && github.base_ref == 'develop' # temporarily disabled
steps:
- uses: convictional/[email protected]
with:
owner: voxel51
repo: fiftyone-teams
github_token: ${{ secrets.FIFTYONE_GITHUB_TOKEN }}
github_user: voxel51-bot
workflow_file_name: merge-oss.yml
ref: develop
wait_interval: 20
client_payload: |
{
"author": "${{ github.event.pull_request.user.login }}",
"branch": "${{ github.head_ref || github.ref_name }}",
"pr": ${{ github.event.pull_request.number }}
}
propagate_failure: true
trigger_workflow: true
wait_workflow: true
test:
needs: modified-files
if: ${{ needs.modified-files.outputs.app-changes == 'true' || needs.modified-files.outputs.fiftyone-changes == 'true' }}
uses: ./.github/workflows/test.yml
all-tests:
runs-on: ubuntu-latest
needs: [build, lint, test, e2e]
if: always()
steps:
- run: sh -c ${{
(needs.build.result == 'success' || needs.build.result == 'skipped') &&
(needs.lint.result == 'success' || needs.lint.result == 'skipped') &&
(needs.test.result == 'success' || needs.test.result == 'skipped') &&
(needs.e2e.result == 'success' || needs.e2e.result == 'skipped') }}