Skip to content

Continuous Integration #154

Continuous Integration

Continuous Integration #154

Workflow file for this run

name: Continuous Integration
on:
schedule:
- cron: '0 0 * * 2'
push:
branches:
- main
pull_request:
branches:
- main
paths:
- .github/workflows/ci.yml
- "exopy/**"
- "tests/**"
- setup.py
- pyproject.toml
jobs:
tests:
name: Unit tests
runs-on: windows-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10']
fail-fast: false
steps:
- name: Checkout branch
uses: actions/checkout@v3
- name: Get history and tags for SCM versioning to work
run: |
git fetch --prune --unshallow
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
- name: Install project
run: |
pip install -e .
- name: Install test requirements
run: |
python -m pip install -r test_requirements.txt
- name: Run tests
timeout-minutes: 20
run: python -X dev -m pytest tests -v -W error --cov --cov-report xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
if: matrix.os != 'windows-latest'
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true