From e9c03776ae57849a6d552abb08ac381ef77452c6 Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Sun, 5 Feb 2023 21:15:04 -0700 Subject: [PATCH] Fix build workflow --- .github/workflows/build_workflow.yml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build_workflow.yml b/.github/workflows/build_workflow.yml index 5aa7125..6338bfc 100644 --- a/.github/workflows/build_workflow.yml +++ b/.github/workflows/build_workflow.yml @@ -15,6 +15,7 @@ env: jobs: pre-commit-hooks: + name: lint with pre-commit runs-on: ubuntu-latest timeout-minutes: 2 steps: @@ -42,8 +43,8 @@ jobs: uses: pre-commit/action@v3.0.0 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: @@ -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