From b4bc7cc118c9eb8feffe9fa623ba9ae5ff2d82b0 Mon Sep 17 00:00:00 2001 From: Stefan Voelk Date: Thu, 26 Sep 2024 15:02:47 +0200 Subject: [PATCH] Update install_and_test: conda --- .github/workflows/install_and_test.yml | 33 +++++++++++++------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index 844c0e8..aa577a9 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -14,26 +14,25 @@ permissions: jobs: build: - - runs-on: ubuntu-latest - + name: (${{ matrix.os }}, Miniforge) + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: ["ubuntu-latest"] + python-version: ["3.11.5"] steps: - uses: actions/checkout@v4 - - name: Set up Python 3.11.5 - uses: actions/setup-python@v3 + - name: Setup conda environment + uses: conda-incubator/setup-miniconda/setup-miniconda@v3 with: - python-version: "3.11.5" - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install flake8 pytest - pip install ".[dev]" - - name: Lint with flake8 - run: | - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + auto-update-conda: true + python-version: ${{ matrix.python-version }} + environment-file: environment_dev.yaml + miniforge-version: latest + - name: Conda info + shell: bash -el {0} + run: conda info - name: Test with pytest run: | + cd tests/ pytest