Skip to content

CLN: Update ci workflows #1

CLN: Update ci workflows

CLN: Update ci workflows #1

Workflow file for this run

name: Tests

Check failure on line 1 in .github/workflows/test.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/test.yml

Invalid workflow file

Cannot define both `uses` and `steps` at the same time for the following jobs: big, codecov, fast, hypothesis
on:
push:
branches: [main, "*postfix"]
pull_request:
branches: [main]
jobs:
fast:
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
os: [ubuntu-latest]
include:
- os: macos-latest
python-version: 3.8
- os: macos-latest
python-version: 3.11
- os: windows-latest
python-version: 3.8
- os: windows-latest
python-version: 3.11
runs-on: ${{ matrix.os }}
uses: ./.github/workflows/setup_tests.yml
with:
python-version: ${{ matrix.python-version }}
steps:
- name: Run fast tests
run: pytest --disable-warnings -x --hypothesis-profile ci-fast
hypothesis:
runs-on: ubuntu-latest
uses: ./.github/workflows/setup_tests.yml
with:
python-version: 3.9
steps:
- name: Run just hypothesis tests with more examples
run: python -m pytest --disable-warnings -x -m hypothesis --hypothesis-profile ci --generate-plots
big:
runs-on: ubuntu-latest
uses: ./.github/workflows/setup_tests.yml
with:
python-version: 3.9
steps:
- name: Run just tests marked big
run: XTG_BIGTEST=1 python -m pytest --disable-warnings -x -m bigtest --hypothesis-profile ci --generate-plots
codecov:
runs-on: ubuntu-latest
uses: ./.github/workflows/setup_tests.yml
with:
python-version: 3.9
steps:
- name: Generate coverage report
run: pytest tests --doctest-modules --generate-plots --disable-warnings --cov=xtgeo --hypothesis-profile ci-fast --cov-report=xml:xtgeocoverage.xml;
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
files: xtgeocoverage.xml