ci: lfs false and cache conda #128
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
defaults: | ||
run: | ||
shell: pwsh | ||
jobs: | ||
test: | ||
name: Test (${{ matrix.python-version }}, ${{ matrix.os }}) | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
- windows-latest | ||
python-version: ["3.11", "3.12"] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
lfs: false | ||
- name: Cache conda | ||
uses: actions/cache@v3 | ||
env: | ||
# Increase this value to reset cache if environment.yml has not changed | ||
CACHE_NUMBER: 0 | ||
with: | ||
path: ~/conda_pkgs_dir | ||
key: | ||
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('environment.yml') }} | ||
- uses: conda-incubator/setup-miniconda@a4260408e20b96e80095f42ff7f1a15b27dd94ca # v3.0.4 | ||
if: matrix.os != "windows-latest" | ||
Check failure on line 39 in .github/workflows/test.yaml GitHub Actions / TestInvalid workflow file
|
||
with: | ||
miniforge-version: latest | ||
python-version: ${{ matrix.python-version }} | ||
environment-file: ./environment.yml | ||
- name: install local package | ||
run: invoke install | ||
- name: check | ||
run: invoke check | ||
continue-on-error: true | ||
- name: test | ||
run: invoke test |