Skip to content

Commit 8d10e6e

Browse files
authored
Merge pull request #50 from xylar/fix_github_action
Fix build workflow
2 parents 9199add + e9c0377 commit 8d10e6e

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

.github/workflows/build_workflow.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ env:
1515

1616
jobs:
1717
pre-commit-hooks:
18+
name: lint with pre-commit
1819
runs-on: ubuntu-latest
1920
timeout-minutes: 2
2021
steps:
@@ -42,8 +43,8 @@ jobs:
4243
uses: pre-commit/[email protected]
4344

4445
build:
45-
name: Build (Python ${{ matrix.python-version }})
46-
runs-on: "ubuntu-latest"
46+
name: test pyremap - python ${{ matrix.python-version }}
47+
runs-on: ubuntu-latest
4748
timeout-minutes: 20
4849
defaults:
4950
run:
@@ -65,30 +66,35 @@ jobs:
6566
name: Cache Conda
6667
uses: actions/cache@v3
6768
env:
68-
# Increase this value to reset cache if conda-env/ci.yml has not changed in the workflow
69+
# Increase this value to reset cache if dev-spec.txt has not changed in the workflow
6970
CACHE_NUMBER: 0
7071
with:
7172
path: ~/conda_pkgs_dir
7273
key:
7374
${{ runner.os }}-${{ matrix.python-version }}-conda-${{ env.CACHE_NUMBER }}-${{
74-
hashFiles('conda-env/dev.yml') }}
75+
hashFiles('dev-spec.txt') }}
7576

7677
- if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
7778
name: Set up Conda Environment
7879
uses: conda-incubator/setup-miniconda@v2
7980
with:
8081
activate-environment: "pyremap_ci"
82+
miniforge-variant: Mambaforge
83+
miniforge-version: latest
84+
use-mamba: true
85+
mamba-version: "*"
86+
channels: conda-forge,defaults
8187
channel-priority: strict
8288
auto-update-conda: true
8389
# IMPORTANT: This needs to be set for caching to work properly!
8490
use-only-tar-bz2: true
8591
python-version: ${{ matrix.python-version }}
86-
run: mamba install --file dev-spec.txt
87-
8892

8993
- if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
9094
name: Install pyremap
91-
run: python -m pip install .
95+
run: |
96+
mamba install --file dev-spec.txt
97+
python -m pip install .
9298
9399
- if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
94100
name: Run Tests

0 commit comments

Comments
 (0)