-
Notifications
You must be signed in to change notification settings - Fork 18
150 lines (134 loc) · 4.34 KB
/
integration-tests.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
name: "Run Examples"
on:
push:
branches-ignore:
- "dependabot/**"
- "sourcery/**"
- "pre-commit-ci-update-config"
pull_request:
workflow_dispatch:
jobs:
create-example-list:
name: Create Example List
runs-on: ubuntu-latest
outputs:
example-list: ${{ steps.create-example-list.outputs.example-list }}
steps:
- name: Set example list output
id: create-example-list
uses: glotaran/pyglotaran-examples@main
with:
example_name: set example list
set_example_list: true
run-examples:
name: "Run Example: "
runs-on: ubuntu-latest
needs: [create-example-list]
strategy:
matrix:
example_name: ${{fromJson(needs.create-example-list.outputs.example-list)}}
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install pyglotaran
run: |
pip install wheel
pip install -r requirements_dev.txt
pip install .
- name: ${{ matrix.example_name }}
id: example-run
uses: glotaran/pyglotaran-examples@main
with:
example_name: ${{ matrix.example_name }}
- name: Installed packages
if: always()
run: |
pip freeze
- name: Upload Example Plots Artifact
uses: actions/upload-artifact@v4
with:
name: example-notebooks-${{ matrix.example_name }}
path: ${{ steps.example-run.outputs.notebook-path }}
- name: Upload Example Results
uses: actions/upload-artifact@v4
with:
name: example-results-${{ matrix.example_name }}
path: ~/pyglotaran_examples_results
collect-artifacts:
if: always()
name: "Collect artifacts and reupload as bundle"
runs-on: ubuntu-latest
needs: [run-examples]
steps:
- name: Download Notebooks Artifacts
uses: actions/download-artifact@v4
with:
path: example-notebooks
pattern: example-notebooks-*
merge-multiple: true
- name: Upload Example Notebooks Artifact
uses: actions/upload-artifact@v4
with:
name: example-notebooks
path: example-notebooks
overwrite: true
- name: Delete Intermediate Notebooks artifacts
uses: GeekyEggo/delete-artifact@v5
with:
name: example-notebooks-*
- name: Download Result Artifacts
uses: actions/download-artifact@v4
with:
path: example-results
pattern: example-results-*
merge-multiple: true
- name: Upload Example Result Artifact
uses: actions/upload-artifact@v4
with:
name: example-results
path: example-results
overwrite: true
- name: Delete Intermediate Result artifacts
uses: GeekyEggo/delete-artifact@v5
with:
name: example-results-*
compare-results:
name: Compare Results
runs-on: ubuntu-latest
needs: [collect-artifacts]
steps:
- name: Checkout compare results
uses: actions/checkout@v4
with:
repository: "glotaran/pyglotaran-examples"
ref: comparison-results
path: comparison-results
- name: Download result artifact
uses: actions/download-artifact@v4
with:
name: example-results
path: comparison-results-current
- name: Delete Intermediate artifacts
uses: GeekyEggo/delete-artifact@v5
with:
name: example-results-*
- name: Show used versions for result creation
run: |
echo "::group:: ✔️ Compare-Results"
echo "✔️ pyglotaran-examples commit: $(< comparison-results/example_commit_sha.txt)"
echo "✔️ pyglotaran commit: $(< comparison-results/pyglotaran_commit_sha.txt)"
echo "::endgroup::"
echo "::group:: ♻️ Current-Results"
echo "♻️ pyglotaran-examples commit: $(< comparison-results-current/example_commit_sha.txt)"
echo "::endgroup::"
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Run result validator
uses: glotaran/pyglotaran-validation@main
with:
validation_name: pyglotaran-examples