Skip to content

Commit

Permalink
Merge branch 'master' into croco_3D_velocities
Browse files Browse the repository at this point in the history
  • Loading branch information
erikvansebille authored Aug 30, 2024
2 parents 76b0b8a + 679d06d commit 226b79e
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 21 deletions.
40 changes: 27 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
python-version: "3.11"
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Conda and parcels
uses: ./.github/actions/install-parcels
with:
Expand All @@ -43,15 +43,16 @@ jobs:
coverage run -m pytest -v -s --html=${{ matrix.os }}_${{ matrix.python-version }}_unit_test_report.html --self-contained-html tests
coverage xml
- name: Codecov
uses: codecov/[email protected]
uses: codecov/[email protected]
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unit-tests
- name: Upload test results
if: ${{ always() }} # Always run this step, even if tests fail
uses: actions/upload-artifact@v3.1.2
uses: actions/upload-artifact@v4
with:
name: Unittest report
name: Unittest report ${{ matrix.os }}-${{ matrix.python-version }}
path: ${{ matrix.os }}_${{ matrix.python-version }}_unit_test_report.html
integration-test:
name: "py${{ matrix.python-version }} | ${{ matrix.os }} | integration tests"
Expand All @@ -63,7 +64,7 @@ jobs:
python-version: ["3.12"]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Conda and parcels
uses: ./.github/actions/install-parcels
with:
Expand All @@ -73,22 +74,34 @@ jobs:
coverage run -m pytest -v -s --nbval-lax -k "not documentation" --html="${{ matrix.os }}_integration_test_report.html" --self-contained-html docs/examples
coverage xml
- name: Codecov
uses: codecov/[email protected]
uses: codecov/[email protected]
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: integration-tests
- name: Upload test results
if: ${{ always() }} # Always run this step, even if tests fail
uses: actions/upload-artifact@v3.1.2
uses: actions/upload-artifact@v4
with:
name: Integration test report
name: Integration test report ${{ matrix.os }}
path: ${{ matrix.os }}_integration_test_report.html
merge-test-artifacts:
runs-on: ubuntu-latest
needs:
- unit-test
- integration-test
steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@v4
with:
name: Testing reports
pattern: "* report *"
typechecking:
name: mypy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Conda and parcels
uses: ./.github/actions/install-parcels
with:
Expand All @@ -98,10 +111,11 @@ jobs:
run: |
mypy --install-types --non-interactive parcels --cobertura-xml-report mypy_report
- name: Upload mypy coverage to Codecov
uses: codecov/codecov-action@v3.1.1
uses: codecov/codecov-action@v4.5.0
if: ${{ always() }} # Upload even on error of mypy
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: mypy_report/cobertura.xml
flags: mypy
fail_ci_if_error: false
16 changes: 8 additions & 8 deletions .github/workflows/pypi-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
runs-on: ubuntu-latest
if: github.repository == 'OceanParcels/parcels'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v3
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: 3.10
Expand All @@ -42,7 +42,7 @@ jobs:
else
echo "✅ Looks good"
fi
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: releases
path: dist
Expand All @@ -51,11 +51,11 @@ jobs:
needs: build-artifacts
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v3
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: 3.10
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: releases
path: dist
Expand All @@ -72,7 +72,7 @@ jobs:
- name: Publish package to TestPyPI
if: github.event_name == 'push'
uses: pypa/gh-action-pypi-publish@v1.5.0
uses: pypa/gh-action-pypi-publish@v1.9.0
with:
user: __token__
password: ${{ secrets.PARCELS_PYPI_TEST_TOKEN }}
Expand All @@ -84,12 +84,12 @@ jobs:
if: github.event_name == 'release'
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: releases
path: dist
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@v1.5.0
uses: pypa/gh-action-pypi-publish@v1.9.0
with:
user: __token__
password: ${{ secrets.PARCELS_PYPI_PROD_TOKEN }}
Expand Down

0 comments on commit 226b79e

Please sign in to comment.