From 9410fdf6d86e048ab346544974ab41989cdac8b4 Mon Sep 17 00:00:00 2001 From: Filipe Fernandes Date: Thu, 19 May 2022 15:17:01 -0300 Subject: [PATCH 1/3] use micromamba in tests --- .github/workflows/deploy-docs.yml | 15 +++++++-------- .github/workflows/tarball-tests.yml | 15 +++++++-------- .github/workflows/tests.yml | 15 +++++++-------- 3 files changed, 21 insertions(+), 24 deletions(-) diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 3a3debb..539d237 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -9,19 +9,18 @@ jobs: run: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Setup Conda - uses: s-weigand/setup-conda@v1 + - name: Setup Micromamba + uses: mamba-org/provision-with-micromamba@main with: - activate-conda: false - conda-channels: conda-forge + environment-file: false - name: Create environment shell: bash -l {0} run: | - conda create --name TEST python=3 python-build numpy --file requirements-dev.txt - source activate TEST + micromamba create --name TEST python=3 python-build numpy --file requirements-dev.txt --channel conda-forge + micromamba activate TEST pip install -e . --no-deps --force-reinstall conda info --all conda list @@ -29,7 +28,7 @@ jobs: - name: Build documentation shell: bash -l {0} run: | - source activate TEST + micromamba activate TEST set -e pushd docs make clean html linkcheck diff --git a/.github/workflows/tarball-tests.yml b/.github/workflows/tarball-tests.yml index d6f84d8..eccb1b7 100644 --- a/.github/workflows/tarball-tests.yml +++ b/.github/workflows/tarball-tests.yml @@ -9,26 +9,25 @@ jobs: run: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Setup Conda - uses: s-weigand/setup-conda@v1 + - name: Setup Micromamba + uses: mamba-org/provision-with-micromamba@main with: - activate-conda: false - conda-channels: conda-forge + environment-file: false - name: Create environment shell: bash -l {0} run: | - conda create --name TEST python=3 python-build numpy --file requirements-dev.txt - source activate TEST + micromamba create --name TEST python=3 python-build numpy --file requirements-dev.txt --channel conda-forge + micromamba activate TEST conda info --all conda list - name: Tarball shell: bash -l {0} run: | - source activate TEST + micromamba activate TEST python -m build --skip-dependency-check --sdist --wheel . check-manifest --verbose twine check dist/* diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a00aa89..e9adcb0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -20,19 +20,18 @@ jobs: numpy-version: "1.19" steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Setup Conda - uses: s-weigand/setup-conda@v1 + - name: Setup Micromamba + uses: mamba-org/provision-with-micromamba@main with: - activate-conda: false - conda-channels: conda-forge + environment-file: false - name: Python ${{ matrix.python-version }} numpy ${{ matrix.numpy-version }} shell: bash -l {0} run: | - conda create --name TEST python=${{ matrix.python-version }} python-build numpy=${{ matrix.numpy-version }} --file requirements-dev.txt - source activate TEST + micromamba create --name TEST python=${{ matrix.python-version }} python-build numpy=${{ matrix.numpy-version }} --file requirements-dev.txt --channel conda-forge + micromamba activate TEST pip install -e . --no-deps --force-reinstall conda info --all conda list @@ -40,6 +39,6 @@ jobs: - name: Tests shell: bash -l {0} run: | - source activate TEST + micromamba activate TEST python -c "import numpy; print(f'Running numpy {numpy.__version__}')" pytest -s -rxs -v gsw/tests From ae27d5f2bc9fa9c3376b1ad8c0b4f7336741aa34 Mon Sep 17 00:00:00 2001 From: Filipe Fernandes Date: Thu, 19 May 2022 15:57:11 -0300 Subject: [PATCH 2/3] don't fast fail --- .github/workflows/tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e9adcb0..3d649b5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -18,6 +18,7 @@ jobs: exclude: - python-version: "3.10" numpy-version: "1.19" + fail-fast: false steps: - uses: actions/checkout@v3 From b1f31c0baa8d413fe6329b6dd18d8300d2885a5f Mon Sep 17 00:00:00 2001 From: Filipe Fernandes Date: Thu, 19 May 2022 17:32:58 -0300 Subject: [PATCH 3/3] update all GHA and fix missing conda calls --- .github/workflows/build_linux.yml | 2 +- .github/workflows/build_mac.yml | 4 ++-- .github/workflows/build_win.yml | 4 ++-- .github/workflows/pre-commit.yml | 4 ++-- .github/workflows/tarball-tests.yml | 4 ++-- .github/workflows/tests.yml | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build_linux.yml b/.github/workflows/build_linux.yml index 7671ca0..7809153 100644 --- a/.github/workflows/build_linux.yml +++ b/.github/workflows/build_linux.yml @@ -9,7 +9,7 @@ jobs: packages: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Get tags run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* diff --git a/.github/workflows/build_mac.yml b/.github/workflows/build_mac.yml index c1a4159..c3234af 100644 --- a/.github/workflows/build_mac.yml +++ b/.github/workflows/build_mac.yml @@ -15,7 +15,7 @@ jobs: python-version: ["3.8", "3.9", "3.10"] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Get tags run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* @@ -49,7 +49,7 @@ jobs: shell: bash - name: upload wheel - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v3 with: name: dist_${{ matrix.os }}_${{ matrix.python-version }} path: dist diff --git a/.github/workflows/build_win.yml b/.github/workflows/build_win.yml index 716af1f..3f49872 100644 --- a/.github/workflows/build_win.yml +++ b/.github/workflows/build_win.yml @@ -15,7 +15,7 @@ jobs: python-version: ["3.8", "3.9", "3.10"] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Get tags run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* @@ -49,7 +49,7 @@ jobs: shell: bash - name: upload wheel - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v3 with: name: dist_${{ matrix.os }}_${{ matrix.python-version }} path: dist diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 7233479..9a86e1f 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -9,6 +9,6 @@ jobs: pre-commit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-python@v3 - uses: pre-commit/action@v2.0.0 diff --git a/.github/workflows/tarball-tests.yml b/.github/workflows/tarball-tests.yml index eccb1b7..b8d8fab 100644 --- a/.github/workflows/tarball-tests.yml +++ b/.github/workflows/tarball-tests.yml @@ -21,8 +21,8 @@ jobs: run: | micromamba create --name TEST python=3 python-build numpy --file requirements-dev.txt --channel conda-forge micromamba activate TEST - conda info --all - conda list + micromamba info --all + micromamba list - name: Tarball shell: bash -l {0} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3d649b5..5a53d4d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -34,8 +34,8 @@ jobs: micromamba create --name TEST python=${{ matrix.python-version }} python-build numpy=${{ matrix.numpy-version }} --file requirements-dev.txt --channel conda-forge micromamba activate TEST pip install -e . --no-deps --force-reinstall - conda info --all - conda list + micromamba info --all + micromamba list - name: Tests shell: bash -l {0}