Skip to content

Commit

Permalink
Fix build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
xylar committed Feb 6, 2023
1 parent 9199add commit e9c0377
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions .github/workflows/build_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ env:

jobs:
pre-commit-hooks:
name: lint with pre-commit
runs-on: ubuntu-latest
timeout-minutes: 2
steps:
Expand Down Expand Up @@ -42,8 +43,8 @@ jobs:
uses: pre-commit/[email protected]

build:
name: Build (Python ${{ matrix.python-version }})
runs-on: "ubuntu-latest"
name: test pyremap - python ${{ matrix.python-version }}
runs-on: ubuntu-latest
timeout-minutes: 20
defaults:
run:
Expand All @@ -65,30 +66,35 @@ jobs:
name: Cache Conda
uses: actions/cache@v3
env:
# Increase this value to reset cache if conda-env/ci.yml has not changed in the workflow
# Increase this value to reset cache if dev-spec.txt has not changed in the workflow
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key:
${{ runner.os }}-${{ matrix.python-version }}-conda-${{ env.CACHE_NUMBER }}-${{
hashFiles('conda-env/dev.yml') }}
hashFiles('dev-spec.txt') }}

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


- if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
name: Install pyremap
run: python -m pip install .
run: |
mamba install --file dev-spec.txt
python -m pip install .
- if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
name: Run Tests
Expand Down

0 comments on commit e9c0377

Please sign in to comment.