Skip to content

Commit

Permalink
Merge pull request #1667 from OceanParcels/v/small-changes
Browse files Browse the repository at this point in the history
Combine workflow files, add codecov token
  • Loading branch information
VeckoTheGecko authored Aug 23, 2024
2 parents 46286ba + 593cbdc commit 997e3f8
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 47 deletions.
35 changes: 33 additions & 2 deletions .github/workflows/unit-tests.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: unit-tests
name: ci
on:
push:
branches:
Expand All @@ -16,7 +16,7 @@ defaults:

jobs:
unit-test:
name: Unittesting on ${{ matrix.os }} with python ${{ matrix.python-version }}
name: "py${{ matrix.python-version }} | ${{ matrix.os }} | unit tests"
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
Expand All @@ -43,10 +43,41 @@ jobs:
- name: Codecov
uses: codecov/codecov-action@v3.1.1
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
with:
name: Unittest report
path: ${{ matrix.os }}_${{ matrix.python-version }}_unit_test_report.html
integration-test:
name: "py${{ matrix.python-version }} | ${{ matrix.os }} | integration tests"
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: [macos, ubuntu, windows]
python-version: ["3.12"]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Conda and parcels
uses: ./.github/actions/install-parcels
with:
environment-file: environment.yml
- name: Integration test
run: |
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/codecov-action@v3.1.1
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
with:
name: Integration test report
path: ${{ matrix.os }}_integration_test_report.html
45 changes: 0 additions & 45 deletions .github/workflows/integration-tests.yml

This file was deleted.

0 comments on commit 997e3f8

Please sign in to comment.