From 95ea4c5d425fd279f0b46d039459832a7e423a60 Mon Sep 17 00:00:00 2001 From: jacquelynsmale Date: Wed, 20 Mar 2024 11:39:27 -0800 Subject: [PATCH] try to switch to 3.8 --- .github/workflows/test.yml | 37 +++++++++++++++++++++++++++++++------ 1 file changed, 31 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d4d0edd..c87e697 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,16 +1,41 @@ -name: Test with pytest - -on: push +on: + workflow_call: + inputs: + local_package_name: + required: true + type: string + python_versions: + required: false + default: >- + ["3.8"] + description: JSON string containing the list of python versions to test + type: string + fail_fast: + required: false + default: false + description: Cancel all in-progress and queued pytest jobs if any job in the matrix fails + type: boolean jobs: pytest: runs-on: ubuntu-latest + strategy: + fail-fast: ${{ inputs.fail_fast }} + matrix: + python_version: ${{ fromJson(inputs.python_versions) }} + steps: - uses: actions/checkout@v4 - - uses: mamba-org/provision-with-micromamba@v16 + - uses: mamba-org/setup-micromamba@v1 + with: + environment-file: environment.yml + create-args: >- + python=${{ matrix.python_version }} - - shell: bash -l {0} + - name: Pytest in conda environment + shell: bash -l {0} run: | - make pytest + python -m pip install --no-deps . + pytest --cov=${{ inputs.local_package_name }} \ No newline at end of file