CI #126
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: CI | |
on: | |
# run every Sunday at 3:33 UTC | |
schedule: | |
- cron: "33 3 * * 0" | |
push: | |
branches: | |
- "main" | |
pull_request: | |
branches: | |
- "main" | |
concurrency: | |
group: "${{ github.ref }}-${{ github.head_ref }}" | |
cancel-in-progress: true | |
jobs: | |
test: | |
name: Test ${{ matrix.os }} with Python ${{ matrix.python-version }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macOS-latest, windows-latest] | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
exclude: | |
- os: macOS-latest | |
python-version: "3.9" | |
- os: macOS-latest | |
python-version: "3.10" | |
- os: macOS-latest | |
python-version: "3.11" | |
- os: windows-latest | |
python-version: "3.9" | |
- os: windows-latest | |
python-version: "3.10" | |
- os: windows-latest | |
python-version: "3.11" | |
steps: | |
- name: git checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-tags: true | |
- name: Setup Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Display Python version ${{ matrix.python-version }} | |
run: python -c "import sys; print(sys.version)" | |
- name: Install pytest, pytest plugins | |
run: | | |
python -m pip install wheel | |
python -m pip install pytest pytest-cov pytest-pep8 | |
- name: Install main dependencies | |
run: | | |
python -m pip install six | |
python -m pip install --only-binary=numpy numpy | |
python -m pip install --only-binary=scipy scipy | |
- name: Install package | |
run: | | |
python -m pip install . | |
- name: Run tests | |
run: | | |
pytest -v --cov=numkit --cov-report=xml --color=yes numkit/tests | |
- name: Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
name: codecov-${{ matrix.os }}-py${{ matrix.python-version }} | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./coverage.xml | |
fail_ci_if_error: false |