-
Notifications
You must be signed in to change notification settings - Fork 11
50 lines (41 loc) · 1.43 KB
/
actions.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
name: Run tests
on:
pull_request:
jobs:
run_notebooks:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4.1.7
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v45
# To compare changes between the current commit and the last pushed remote commit set `since_last_remote_commit: true`. e.g
# with:
# since_last_remote_commit: true
with:
files: |
**.ipynb
- name: Start docker and test container
if: steps.changed-files.outputs.any_changed == 'true'
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
chmod +x ./tests/launch-test-environment.sh
./tests/launch-test-environment.sh
shell: bash
- name: Test all changed files
if: steps.changed-files.outputs.any_changed == 'true'
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
for file in ${ALL_CHANGED_FILES}; do
echo "$file"
docker exec jupyter papermill ../$file /dev/null --execution-timeout=1200 --log-level ERROR
done
- name: Stop docker and test container
if: steps.changed-files.outputs.any_changed == 'true'
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
docker compose --profile all-services down -v
shell: bash