Skip to content

Commit bce19b1

Browse files
authored
Merge pull request #496 from bioimage-io/fix-ci
Update CI/CD
2 parents 56988e4 + 4d59c19 commit bce19b1

File tree

6 files changed

+38
-61
lines changed

6 files changed

+38
-61
lines changed

.github/workflows/build.yml

Lines changed: 27 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
black:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v3
1414
- name: Check files using the black formatter
1515
uses: rickstaa/action-black@v1
1616
id: action_black
@@ -29,52 +29,55 @@ jobs:
2929
python-version: [3.7, 3.8, 3.9]
3030

3131
steps:
32-
- uses: actions/checkout@v2
33-
- name: Set up Python ${{ matrix.python-version }}
34-
uses: actions/setup-python@v2
32+
- uses: actions/checkout@v3
33+
- uses: actions/setup-python@v4
3534
with:
3635
python-version: ${{ matrix.python-version }}
36+
cache: 'pip'
3737
- name: Install dependencies
3838
run: |
39-
python -m pip install --upgrade pip
40-
pip install tox tox-gh-actions mypy
41-
- name: Test with tox
42-
run: tox
39+
pip install --upgrade pip
40+
pip install -e .[test]
41+
- name: Test with pytest
42+
run: pytest tests
4343
- name: Check passthrough models
4444
run: python scripts/generate_passthrough_modules.py check
45-
- name: Mypy
46-
if: ${{ matrix.python-version != '3.7' }}
47-
run: |
48-
mkdir -p .mypy-cache
49-
mypy . --install-types --non-interactive --cache-dir .mypy-cache --explicit-package-bases --check-untyped-defs
45+
# todo: add mypy checks for python 3.10 when we can add KW_ONLY to dataclasses
46+
# allowing dataclass inheritance w/o the 'missing' default value
47+
# - name: MyPy
48+
# if: ${{ matrix.python-version == '3.10' }}
49+
# run: |
50+
# mkdir -p .mypy-cache
51+
# mypy . --install-types --non-interactive --cache-dir .mypy-cache --explicit-package-bases --check-untyped-defs
5052

5153
conda-build:
5254
runs-on: ubuntu-latest
5355
needs: test
5456
steps:
5557
- name: checkout
56-
uses: actions/checkout@v2
58+
uses: actions/checkout@v3
5759
with:
5860
fetch-depth: 0
59-
- name: setup conda
60-
uses: conda-incubator/setup-miniconda@v2
61+
- name: Install Conda environment with Micromamba
62+
uses: mamba-org/provision-with-micromamba@main
6163
with:
62-
auto-update-conda: true
63-
auto-activate-base: true
64-
activate-environment: ""
64+
environment-file: false
65+
environment-name: build-env
66+
channels: conda-forge
67+
extra-specs: |
68+
boa
6569
- name: linux conda build
6670
shell: bash -l {0}
6771
run: |
68-
conda install -n base -c conda-forge conda-build pip -y
69-
conda build -c conda-forge conda-recipe
72+
conda mambabuild -c conda-forge conda-recipe
7073
7174
deploy:
7275
runs-on: ubuntu-latest
7376
needs: test
7477
steps:
75-
- uses: actions/checkout@v2
78+
- uses: actions/checkout@v3
7679
- name: Set up Python 3.9
77-
uses: actions/setup-python@v2
80+
uses: actions/setup-python@v4
7881
with:
7982
python-version: 3.9
8083
- name: Install dependencies
@@ -97,7 +100,7 @@ jobs:
97100
if [[ -n '${{ github.event.pull_request.head.ref }}' ]]; then branch=gh-pages-${{ github.event.pull_request.head.ref }}; else branch=gh-pages; fi
98101
echo "::set-output name=branch::$branch"
99102
- name: Deploy to ${{ steps.get_branch.outputs.branch }} 🚀
100-
uses: JamesIves/github-pages-deploy-action@4.1.4
103+
uses: JamesIves/github-pages-deploy-action@v4
101104
with:
102105
branch: ${{ steps.get_branch.outputs.branch }}
103106
folder: dist

.github/workflows/labeler.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,15 @@ on:
44
push:
55
branches:
66
- main
7-
- master
87

98
jobs:
109
labeler:
1110
runs-on: ubuntu-latest
1211
steps:
1312
- name: Check out the repository
14-
uses: actions/checkout@v2.3.4
13+
uses: actions/checkout@v3
1514

1615
- name: Run Labeler
17-
uses: crazy-max/ghaction-github-labeler@v3.1.1
16+
uses: crazy-max/ghaction-github-labeler@v4
1817
with:
1918
skip-delete: true

.github/workflows/post-merge-cleanup.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
if: github.event.pull_request.merged == true
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v2
12+
- uses: actions/checkout@v3
1313
- name: check if branch still exists
1414
id: ls-remote
1515
run: |

.github/workflows/release.yml

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,36 +4,29 @@ on:
44
push:
55
branches:
66
- main
7-
- master
87

98
jobs:
109
publish-pypi:
1110
name: Publish to PyPI
1211
runs-on: ubuntu-latest
1312
steps:
1413
- name: Check out the repository
15-
uses: actions/checkout@v2.3.4
14+
uses: actions/checkout@v3
1615
with:
1716
fetch-depth: 2
1817

1918
- name: Set up Python
20-
uses: actions/setup-python@v2.2.2
19+
uses: actions/setup-python@v4
2120
with:
2221
python-version: "3.8"
23-
24-
- name: Upgrade pip
25-
run: |
26-
python -m pip install --upgrade pip
27-
pip --version
28-
22+
cache: 'pip'
2923
- name: Install dependencies
3024
run: |
25+
pip install --upgrade pip
3126
pip install wheel
32-
pip install tox tox-gh-actions
33-
34-
- name: Test with tox
35-
run: tox
36-
27+
pip install -e .[test]
28+
- name: Test with pytest
29+
run: pytest tests
3730
- name: Check passthrough models
3831
run: python scripts/generate_passthrough_modules.py check
3932

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"typing-extensions",
3939
],
4040
entry_points={"console_scripts": ["bioimageio = bioimageio.spec.__main__:app"]},
41-
extras_require={"test": ["pytest", "tox", "mypy"], "dev": ["pre-commit"]},
41+
extras_require={"test": ["black", "mypy", "pytest"], "dev": ["pre-commit"]},
4242
scripts=[
4343
"scripts/generate_json_specs.py",
4444
"scripts/generate_processing_docs.py",

tox.ini

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)