CLN: Update ci workflows #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | ||
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 |