Skip to content

Commit

Permalink
update CI (#889)
Browse files Browse the repository at this point in the history
* use concurrency feature for workflows

* use setup_micromamba

* use setup_micromamba
  • Loading branch information
CagtayFabry authored Aug 29, 2023
1 parent 513cb0c commit ebdfcaf
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 29 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/build_pkg.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
name: package builds
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
on:
push:
branches:
Expand Down Expand Up @@ -38,9 +41,13 @@ jobs:
fetch-depth: 0 # Fetch all history for all tags and branches

- name: Setup Conda Environment
uses: mamba-org/provision-with-micromamba@main
uses: mamba-org/setup-micromamba@v1.4.3
with:
environment-file: ./devtools/conda.recipe/build_env.yml
environment-name: build_env
init-shell: >-
bash
powershell
cache-downloads: true

- name: activate build env
Expand Down
13 changes: 0 additions & 13 deletions .github/workflows/cancel.yml

This file was deleted.

12 changes: 9 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
name: documentation builds
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
on:
push:
branches:
Expand All @@ -25,7 +28,7 @@ on:
# execute commands with conda aware shell by default:
defaults:
run:
shell: bash -l {0}
shell: bash -el {0}

jobs:
build:
Expand All @@ -44,11 +47,14 @@ jobs:
fetch-depth: 0 # Fetch all history for all tags and branches

- name: Setup Conda Environment
uses: mamba-org/provision-with-micromamba@main
uses: mamba-org/setup-micromamba@v1.4.3
with:
environment-file: ./doc/rtd_environment.yml
environment-name: rtd
cache-env: true
init-shell: >-
bash
powershell
cache-environment: true

- name: activate build env
run: micromamba activate rtd
Expand Down
23 changes: 17 additions & 6 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
name: pytest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
on:
push:
pull_request:
Expand Down Expand Up @@ -43,12 +46,16 @@ jobs:
extras: 'test vis media'
setup_requires: 'include'

- uses: mamba-org/provision-with-micromamba@main
- name: Setup Conda Environment
uses: mamba-org/[email protected]
with:
environment-file: ./environment.yml
environment-name: weldx
cache-env: true
extra-specs: |
init-shell: >-
bash
powershell
cache-environment: true
create-args: >-
python=${{ matrix.py }}
wheel
pip
Expand Down Expand Up @@ -139,12 +146,16 @@ jobs:
extras: 'test vis media'
setup_requires: 'include'

- uses: mamba-org/provision-with-micromamba@main
- name: Setup Conda Environment
uses: mamba-org/[email protected]
with:
environment-file: ./environment.yml
environment-name: weldx
cache-env: true
extra-specs: |
init-shell: >-
bash
powershell
cache-environment: true
create-args: >-
python=${{ matrix.py }}
wheel
pip
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/pytest_asdf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,16 @@ jobs:
extras: 'test'
setup_requires: 'include'

- uses: mamba-org/provision-with-micromamba@main
- name: Setup Conda Environment
uses: mamba-org/[email protected]
with:
environment-file: ./environment.yml
environment-name: weldx
cache-env: true
extra-specs: |
init-shell: >-
bash
powershell
cache-environment: true
create-args: >-
python=3.10
pip
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/static_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,13 @@ jobs:
./.mypy_cache
key: ${{ runner.os }}-${{ hashFiles('./environment.yml') }}

- uses: mamba-org/provision-with-micromamba@main
- name: Setup Conda Environment
uses: mamba-org/[email protected]
with:
environment-file: ./environment.yml
environment-name: weldx
cache-env: true
extra-specs: |
cache-environment: true
create-args: >-
python=3.9
mypy
- name: activate env
Expand Down

0 comments on commit ebdfcaf

Please sign in to comment.