Skip to content

Commit 0823824

Browse files
authored
Merge pull request #526 from FynnBe/dev
Update GH action versions and use micromamba
2 parents 14eba84 + 9134e89 commit 0823824

File tree

6 files changed

+41
-37
lines changed

6 files changed

+41
-37
lines changed

.github/workflows/auto_update_main.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ jobs:
4545
found_new_resources: ${{ steps.update_external.outputs.found_new_resources || 'no' }}
4646

4747
steps:
48-
- uses: actions/checkout@v2
48+
- uses: actions/checkout@v3
4949
with:
5050
fetch-depth: 0 # get all branches to check for pending resources by checking if auto-update-... branch exists
5151
- name: checkout gh-pages for update_partner_resources.py
52-
uses: actions/checkout@v2
52+
uses: actions/checkout@v3
5353
with:
5454
ref: gh-pages
5555
path: gh-pages
@@ -59,7 +59,7 @@ jobs:
5959
id: update_external
6060
run: python scripts/update_external_resources.py --max-resource-count 15 ${{ github.event_name == 'pull_request' && '--no-ignore-status-5xx' || '--ignore-status-5xx' }}
6161
- name: "Upload collection update"
62-
uses: actions/upload-artifact@v2
62+
uses: actions/upload-artifact@v3
6363
with:
6464
name: collection-update
6565
path: dist
@@ -74,7 +74,7 @@ jobs:
7474
run: python scripts/update_partner_resources.py
7575
- name: Upload preview of updated partner resources
7676
if: github.event_name == 'pull_request'
77-
uses: actions/upload-artifact@v2
77+
uses: actions/upload-artifact@v3
7878
with:
7979
name: preview-partner-resources
8080
path: dist
@@ -108,8 +108,8 @@ jobs:
108108
runs-on: ubuntu-latest
109109

110110
steps:
111-
- uses: actions/checkout@v2
112-
- uses: actions/checkout@v2
111+
- uses: actions/checkout@v3
112+
- uses: actions/checkout@v3
113113
with:
114114
ref: gh-pages
115115
path: gh-pages
@@ -119,7 +119,7 @@ jobs:
119119
run: python scripts/generate_collection_rdf.py
120120
- name: Upload preview of collection.json
121121
if: github.event_name == 'pull_request'
122-
uses: actions/upload-artifact@v2
122+
uses: actions/upload-artifact@v3
123123
with:
124124
name: preview-collection-json
125125
path: dist/collection.json
@@ -151,16 +151,16 @@ jobs:
151151
matrix: ${{ fromJson(needs.update-resources.outputs.updated_resources_matrix) }}
152152

153153
steps:
154-
- uses: actions/checkout@v2
155-
- uses: actions/checkout@v2
154+
- uses: actions/checkout@v3
155+
- uses: actions/checkout@v3
156156
with:
157157
ref: gh-pages
158158
path: gh-pages
159159
- run: mkdir dist
160160
- run: cp gh-pages/pr_urls.json dist
161161
continue-on-error: true
162162
- name: download new collection
163-
uses: actions/download-artifact@v2
163+
uses: actions/download-artifact@v3
164164
with:
165165
name: collection-update
166166
path: collection-update
@@ -177,7 +177,7 @@ jobs:
177177
- name: Create Pull Request
178178
if: github.event_name != 'pull_request'
179179
id: cpr
180-
uses: peter-evans/create-pull-request@v3
180+
uses: peter-evans/create-pull-request@v4
181181
with:
182182
token: ${{ secrets.PAT }} # using a PAT will make sure we can trigger the CI in PR
183183
commit-message: 'Update ${{ matrix.update.resource_id }}'

.github/workflows/post_pr.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
if: github.event.pull_request.merged == false # if pr was merged the branch is deleted via gh settings
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v3
1414
- name: check if remote still exists
1515
id: ls-remote
1616
run: |

.github/workflows/reset_pending_auto_update.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
run:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v2
9+
- uses: actions/checkout@v3
1010
- name: install script deps
1111
run: pip install typer
1212
- id: detect_auto_updates

.github/workflows/trigger_partner_wf.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
# - ...
2626

2727
steps:
28-
- uses: actions/checkout@v2
28+
- uses: actions/checkout@v3
2929
with:
3030
ref: gh-pages
3131
- name: trigger ${{ matrix.partner_id }}

.github/workflows/validate_resources.yaml

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ jobs:
2929
has_dynamic_test_cases: ${{ steps.static_validation.outputs.has_dynamic_test_cases }}
3030

3131
steps:
32-
- uses: actions/checkout@v2
33-
- uses: actions/checkout@v2
32+
- uses: actions/checkout@v3
33+
- uses: actions/checkout@v3
3434
with:
3535
ref: last_ci_run
3636
path: last_ci_run
37-
- uses: actions/checkout@v2
37+
- uses: actions/checkout@v3
3838
with:
3939
ref: gh-pages
4040
path: gh-pages
@@ -53,7 +53,7 @@ jobs:
5353
run: python scripts/static_validation.py '${{ steps.update_rdfs.outputs.pending_matrix_bioimageio }}'
5454
- name: Upload static validation summaries and conda envs
5555
if: steps.update_rdfs.outputs.has_pending_matrix_bioimageio == 'yes'
56-
uses: actions/upload-artifact@v2
56+
uses: actions/upload-artifact@v3
5757
with:
5858
name: static_validation_artifact
5959
path: dist/static_validation_artifact
@@ -71,35 +71,38 @@ jobs:
7171
matrix: ${{ fromJson(needs.static-validation.outputs.dynamic_test_cases) }} # [{env_name: ..., resource_id: ..., version_id: ..., weight_format: ...}, ...]
7272

7373
steps:
74-
- uses: actions/checkout@v2
74+
- uses: actions/checkout@v3
7575
- name: download environment.yaml
76-
uses: actions/download-artifact@v2
76+
uses: actions/download-artifact@v3
7777
with:
7878
name: static_validation_artifact
7979
path: artifacts/static_validation_artifact
8080
- name: install validation dependencies
8181
id: create_env
82-
continue-on-error: true # we inspect this step's outcome in dynamic_validation.py
83-
timeout-minutes: 30
84-
uses: conda-incubator/setup-miniconda@v2
82+
uses: mamba-org/provision-with-micromamba@main
8583
with:
86-
auto-update-conda: true
87-
mamba-version: "*"
88-
channel-priority: strict
89-
activate-environment: ${{ matrix.env_name }}
84+
environment-name: ${{ matrix.env_name }}
9085
environment-file: artifacts/static_validation_artifact/${{ matrix.resource_id }}/${{ matrix.version_id }}/conda_env_${{ matrix.weight_format }}.yaml
91-
- name: install minimal script deps
92-
if: steps.create_env.outcome != 'success'
93-
run: pip install typer bioimageio.spec
86+
extra-specs: | # script dependencies
87+
typer
88+
bioimageio.spec
89+
continue-on-error: true # we inspect this step's outcome in dynamic_validation.py
90+
timeout-minutes: 60
91+
# atm bioimageio.core imports directly from tqdm, PR to import from spec is on the way...
92+
# todo: remove tqdm to avoid spamming logs
93+
# - name: remove tqdm to avoid spamming logs
94+
# shell: bash -l {0}
95+
# run: conda remove --yes --force tqdm
96+
# continue-on-error: true
9497
- name: get artifact name wo forward slashes
9598
id: artifact_name
9699
run: echo ::set-output name=name::dynamic_validation_artifact_$(echo ${{ matrix.resource_id }}_${{ matrix.version_id }}_${{ matrix.weight_format }} | sed 's#/##g')
97100
- name: dynamic validation
98101
shell: bash -l {0}
99-
timeout-minutes: 30
102+
timeout-minutes: 60
100103
run: python scripts/dynamic_validation.py dist/dynamic_validation_artifact ${{ matrix.resource_id }} ${{ matrix.version_id }} ${{ matrix.weight_format }} --create-env-outcome ${{ steps.create_env.outcome }} --${{ contains(inputs.deploy_to, 'gh-pages') && 'no-ignore' || 'ignore' }}-rdf-source-field-in-validation
101104
- name: Upload validation summary
102-
uses: actions/upload-artifact@v2
105+
uses: actions/upload-artifact@v3
103106
with:
104107
name: ${{ steps.artifact_name.outputs.name }}
105108
path: dist/dynamic_validation_artifact/${{ matrix.resource_id }}/${{ matrix.version_id }}/${{ matrix.weight_format }}
@@ -117,13 +120,13 @@ jobs:
117120
runs-on: ubuntu-latest
118121

119122
steps:
120-
- uses: actions/checkout@v2
121-
- uses: actions/checkout@v2
123+
- uses: actions/checkout@v3
124+
- uses: actions/checkout@v3
122125
with:
123126
ref: gh-pages
124127
path: gh-pages
125128
- name: download artifacts
126-
uses: actions/download-artifact@v2
129+
uses: actions/download-artifact@v3
127130
with:
128131
path: artifacts
129132
- name: install script deps
@@ -144,7 +147,7 @@ jobs:
144147
run: python scripts/download_documentation.py --folder dist/gh_pages_update
145148
- name: Upload preview
146149
if: contains(inputs.deploy_to, 'preview')
147-
uses: actions/upload-artifact@v2
150+
uses: actions/upload-artifact@v3
148151
with:
149152
name: preview
150153
path: dist/gh_pages_update

scripts/prepare_to_deploy.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,9 @@ def main(
100100
for sp in dyn_sums:
101101
for sub_summary in get_sub_summaries(sp):
102102
test_summary["tests"]["bioimageio"].append(sub_summary)
103-
core_versions.add(Version(sub_summary["bioimageio_core_version"]))
104103
success &= sub_summary.get("status") == "passed"
104+
if "bioimageio_core_version" in sub_summary:
105+
core_versions.add(Version(sub_summary["bioimageio_core_version"]))
105106

106107
if spec_versions:
107108
test_summary["bioimageio_spec_version"] = str(max(spec_versions))

0 commit comments

Comments
 (0)