Skip to content

Commit

Permalink
[cicd] rewrite recipe to use conda-incubator/setup-miniconda@v3
Browse files Browse the repository at this point in the history
  • Loading branch information
johntruckenbrodt committed Jul 3, 2024
1 parent 92b850b commit 7a17c2a
Showing 1 changed file with 7 additions and 24 deletions.
31 changes: 7 additions & 24 deletions .github/workflows/python-package-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,20 @@ name: conda build
on: [ push ]

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
linux:
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: "latest"
python-version: '3.10'
- name: Set paths and variables windows
if: startsWith(matrix.os, 'windows')
run: |
echo "$env:CONDA\condabin" | Out-File -FilePath $env:GITHUB_PATH -Append
echo "$env:CONDA\Scripts" | Out-File -FilePath $env:GITHUB_PATH -Append
echo "$env:CONDA\Library\bin" | Out-File -FilePath $env:GITHUB_PATH -Append
echo "PROJ_DATA=$env:CONDA\Library\share\proj" | Out-File -FilePath $env:GITHUB_ENV -Append
environment-file: environment.yml
shell: bash -el {0}
- name: Set paths and variables
if: ${{ ! startsWith(matrix.os, 'windows') }}
run: |
echo "$CONDA/bin" >> $GITHUB_PATH
echo "PROJ_DATA=$CONDA/share/proj" >> $GITHUB_ENV
- name: Install dependencies
run: |
conda env update --file environment.yml --name base
- name: Lint with flake8
if: startsWith(matrix.os, 'ubuntu')
run: |
conda install flake8
# stop the build if there are Python syntax errors or undefined names
Expand Down

0 comments on commit 7a17c2a

Please sign in to comment.