From 826029bbc0d9cadb415f70fe809bdd4c8a9c57c9 Mon Sep 17 00:00:00 2001 From: Filipe Fernandes Date: Fri, 26 May 2023 15:28:03 -0300 Subject: [PATCH] provision-with-micromamba is deprecated --- .github/workflows/deploy-docs.yml | 27 ++++++++++++------------- .github/workflows/pypi.yml | 2 +- .github/workflows/tests.yml | 33 +++++++++++++------------------ 3 files changed, 28 insertions(+), 34 deletions(-) diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index f1c57399..bcb0a447 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -19,33 +19,32 @@ jobs: with: fetch-depth: 0 - - name: Setup Micromamba - uses: mamba-org/provision-with-micromamba@main + - name: Setup Micromamba ${{ matrix.python-version }} + uses: mamba-org/setup-micromamba@v1 with: - environment-file: false - - - name: Build environment + environment-name: TEST + init-shell: bash + create-args: >- + python=3 pip + --file requirements.txt + --file requirements-dev.txt + --channel conda-forge + + - name: Install ioos_qc shell: bash -l {0} run: | - micromamba create --name TEST python=3 --file requirements.txt --file docs/requirements.txt --channel conda-forge - micromamba activate TEST python -m pip install -e . --no-deps --force-reinstall - - name: Get the version - id: get_version - run: echo ::set-output name=VERSION::$(python setup.py --version) - - name: Build documentation shell: bash -l {0} - run: | + run: > set -e - micromamba activate TEST pushd docs make clean html linkcheck popd - name: Deploy - if: github.event_name == 'release' || github.event_name == 'push' + if: success() && github.event_name == 'release' uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 9b157d36..0288728f 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -26,7 +26,7 @@ jobs: - name: Install build tools run: | - python -m pip install --upgrade pip wheel setuptools setuptools_scm build twine + python -m pip install --upgrade pip build twine shell: bash - name: Build binary wheel diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f54a5a4a..436d0fe5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -10,7 +10,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - python-version: ["3.7", "3.8", "3.9", "3.10"] + python-version: ["3.8", "3.9", "3.10", "3.11"] os: [ubuntu-latest] numba: [true, false] fail-fast: false @@ -18,35 +18,30 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Setup Micromamba - uses: mamba-org/provision-with-micromamba@main + - name: Setup Micromamba ${{ matrix.python-version }} + uses: mamba-org/setup-micromamba@v1 with: - environment-file: false - - - name: Python ${{ matrix.python-version }} + environment-name: TEST + init-shell: bash + create-args: >- + python=3 pip + --file requirements.txt + --file requirements-dev.txt + --channel conda-forge + + - name: Install ioos_qc shell: bash -l {0} run: | - micromamba create --name TEST python=${{ matrix.python-version }} --file requirements.txt --file tests/requirements.txt --channel conda-forge - micromamba activate TEST - pip install -e . --no-deps --force-reinstall + python -m pip install -e . --no-deps --force-reinstall - name: numba # numba is listed in requirements.txt so we need to remove it below. if: ${{ ! matrix.numba }} shell: bash -l {0} run: | - micromamba activate TEST micromamba remove numba - - name: Debug conda - shell: bash -l {0} - run: | - micromamba activate TEST - micromamba info --all - micromamba list - - name: Tests shell: bash -l {0} run: | - micromamba activate TEST - python -m pytest --disable-warnings + python -m pytest --disable-warnings