From 7a17c2a4e30b691cc8df885ae3e58262f44bee15 Mon Sep 17 00:00:00 2001 From: John Truckenbrodt Date: Wed, 3 Jul 2024 15:56:15 +0200 Subject: [PATCH] [cicd] rewrite recipe to use conda-incubator/setup-miniconda@v3 --- .github/workflows/python-package-conda.yml | 31 +++++----------------- 1 file changed, 7 insertions(+), 24 deletions(-) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index ef12749..c4bbaeb 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -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