-
Notifications
You must be signed in to change notification settings - Fork 3
64 lines (56 loc) · 1.65 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
name: Pull Request Checks
on:
pull_request:
types:
- opened
- synchronize
- reopened
- labeled
- unlabeled
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
changes:
runs-on: ubuntu-latest
outputs:
is-cfc: ${{ steps.check-cfc.outputs.is_cfc }}
is-page: ${{ steps.check-page.outputs.is_page }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v37
- name: Check for new under consideration files
id: check-cfc
run: |
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
if [[ $file == *"data/file_features/under_consideration/"* ]]; then
echo "is_cfc=true" >> $GITHUB_OUTPUT
break
fi
done
- name: Check for changes to the page
id: check-page
run: |
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
if [[ $file == *"conformance-search/"* ]]; then
echo "is_page=true" >> $GITHUB_OUTPUT
break
fi
done
cfc:
needs: changes
if: |
contains(github.event.pull_request.labels.*.name, 'conformance-file') &&
needs.changes.outputs.is-cfc == 'true'
uses: ./.github/workflows/cfc.yml
test:
needs: [changes, cfc]
if: |
always() &&
(needs.cfc.result == 'success' || needs.cfc.result == 'skipped')
uses: ./.github/workflows/test.yml
with:
test-page: ${{ needs.changes.outputs.is-page == 'true' }}