Skip to content

Commit 109768f

Browse files
committed
format and add comment
1 parent 0c6326d commit 109768f

File tree

1 file changed

+52
-52
lines changed

1 file changed

+52
-52
lines changed

.github/workflows/build.yaml

Lines changed: 52 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Test and Deploy bioimageio.core
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [main]
66
pull_request:
7-
branches: [ "**" ]
7+
branches: ['**']
88

99
defaults:
1010
run:
@@ -74,53 +74,53 @@ jobs:
7474
# numpy-version: 2
7575

7676
steps:
77-
- uses: actions/checkout@v4
78-
- uses: actions/setup-python@v6
79-
with:
80-
python-version: ${{matrix.python-version}}
81-
cache: 'pip'
82-
- name: Install dependencies
83-
run: |
84-
pip install --upgrade pip
85-
pip install -e .[dev] numpy==${{matrix.numpy-version}}.*
86-
- name: Pyright
87-
if: matrix.run-expensive-tests
88-
run: |
89-
pyright --version
90-
pyright -p pyproject.toml --pythonversion ${{ matrix.python-version }}
91-
- name: Restore bioimageio cache ${{needs.populate-cache.outputs.cache-key}}
92-
uses: actions/cache/restore@v4
93-
with:
94-
path: bioimageio_cache
95-
key: ${{needs.populate-cache.outputs.cache-key}}
96-
- name: pytest
97-
run: pytest --cov bioimageio --cov-report xml --cov-append --capture no --disable-pytest-warnings
98-
env:
99-
BIOIMAGEIO_CACHE_PATH: bioimageio_cache
100-
RUN_EXPENSIVE_TESTS: ${{ matrix.run-expensive-tests && 'true' || 'false' }}
101-
- name: Save bioimageio cache ${{needs.populate-cache.outputs.cache-key}}
102-
if: matrix.save-cache
103-
uses: actions/cache/save@v4
104-
with:
105-
path: bioimageio_cache
106-
key: ${{needs.populate-cache.outputs.cache-key}}
77+
- uses: actions/checkout@v4
78+
- uses: actions/setup-python@v6
79+
with:
80+
python-version: ${{matrix.python-version}}
81+
cache: 'pip'
82+
- name: Install dependencies
83+
run: |
84+
pip install --upgrade pip
85+
pip install -e .[dev] numpy==${{matrix.numpy-version}}.*
86+
- name: Pyright
87+
if: matrix.run-expensive-tests # pyright is not expensive, but we only want to run it once due to otherwise inconsistent typing
88+
run: |
89+
pyright --version
90+
pyright -p pyproject.toml --pythonversion ${{ matrix.python-version }}
91+
- name: Restore bioimageio cache ${{needs.populate-cache.outputs.cache-key}}
92+
uses: actions/cache/restore@v4
93+
with:
94+
path: bioimageio_cache
95+
key: ${{needs.populate-cache.outputs.cache-key}}
96+
- name: pytest
97+
run: pytest --cov bioimageio --cov-report xml --cov-append --capture no --disable-pytest-warnings
98+
env:
99+
BIOIMAGEIO_CACHE_PATH: bioimageio_cache
100+
RUN_EXPENSIVE_TESTS: ${{ matrix.run-expensive-tests && 'true' || 'false' }}
101+
- name: Save bioimageio cache ${{needs.populate-cache.outputs.cache-key}}
102+
if: matrix.save-cache
103+
uses: actions/cache/save@v4
104+
with:
105+
path: bioimageio_cache
106+
key: ${{needs.populate-cache.outputs.cache-key}}
107107

108-
- if: matrix.report-coverage && github.event_name == 'pull_request'
109-
uses: orgoro/[email protected]
110-
with:
111-
coverageFile: coverage.xml
112-
token: ${{secrets.GITHUB_TOKEN}}
113-
- if: matrix.report-coverage && github.ref == 'refs/heads/main'
114-
run: |
115-
pip install genbadge[coverage]
116-
genbadge coverage --input-file coverage.xml --output-file ./dist/coverage/coverage-badge.svg
117-
coverage html -d dist/coverage
118-
- if: matrix.report-coverage && github.ref == 'refs/heads/main'
119-
uses: actions/upload-artifact@v4
120-
with:
121-
name: coverage
122-
retention-days: 1
123-
path: dist
108+
- if: matrix.report-coverage && github.event_name == 'pull_request'
109+
uses: orgoro/[email protected]
110+
with:
111+
coverageFile: coverage.xml
112+
token: ${{secrets.GITHUB_TOKEN}}
113+
- if: matrix.report-coverage && github.ref == 'refs/heads/main'
114+
run: |
115+
pip install genbadge[coverage]
116+
genbadge coverage --input-file coverage.xml --output-file ./dist/coverage/coverage-badge.svg
117+
coverage html -d dist/coverage
118+
- if: matrix.report-coverage && github.ref == 'refs/heads/main'
119+
uses: actions/upload-artifact@v4
120+
with:
121+
name: coverage
122+
retention-days: 1
123+
path: dist
124124

125125
conda-build:
126126
needs: test
@@ -133,7 +133,7 @@ jobs:
133133
with:
134134
auto-update-conda: true
135135
auto-activate-base: true
136-
activate-environment: ""
136+
activate-environment: ''
137137
channel-priority: strict
138138
miniforge-version: latest
139139
conda-solver: libmamba
@@ -230,14 +230,14 @@ jobs:
230230
uses: pypa/gh-action-pypi-publish@release/v1.12
231231
with:
232232
user: __token__
233-
password: "${{ secrets.PYPI_TOKEN }}"
233+
password: '${{ secrets.PYPI_TOKEN }}'
234234
packages-dir: dist/
235235
verbose: true
236236
- name: Publish the release notes
237237
if: github.ref == 'refs/heads/main'
238238
uses: release-drafter/[email protected]
239239
with:
240240
publish: "${{ steps.tag-version.outputs.new_tag != '' }}"
241-
tag: "${{ steps.tag-version.outputs.new_tag }}"
241+
tag: '${{ steps.tag-version.outputs.new_tag }}'
242242
env:
243-
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
243+
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'

0 commit comments

Comments
 (0)