-
Notifications
You must be signed in to change notification settings - Fork 35
48 lines (40 loc) · 1.06 KB
/
PR-validation.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
name: PR Validation
on:
pull_request:
paths:
- '**/*.usd*'
jobs:
run-usdchecker:
name: Run usdchecker
runs-on: ubuntu-22.04
steps:
- name: Check out repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v37
with:
files: |
**/*.usd*
files_ignore_from_source_file: .github/usdchecker-skiplist.txt
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.7'
- name: Install usd-core PyPI package
run: pip install usd-core --user
- name: Test usdchecker
run: python .github/usdchecker.py --help
- name: Run usdchecker on changed USD files
run: |
set +e
exit_code=0
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
echo "Checking $file"
if ! python .github/usdchecker.py $file; then
exit_code=1;
fi
done
exit $exit_code