Skip to content

Merge pull request #8 from csiro-hydroinformatics/dependabot/pip/cryp… #26

Merge pull request #8 from csiro-hydroinformatics/dependabot/pip/cryp…

Merge pull request #8 from csiro-hydroinformatics/dependabot/pip/cryp… #26

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: matrix-build
on:
push:
branches: [ "experimental", "testing", "master" ]
#pull_request:
# branches: [ "testing" ]
jobs:
build:
strategy:
matrix:
# os: [windows-latest]
os: [ubuntu-latest, macos-latest, windows-latest]
# python-version: ["3.7", "3.8", "3.9", "3.10", pypy-2.7, pypy-3.8]
python-version: ["3.9", "3.10"]
exclude:
- os: macos-latest
python-version: "3.10"
- os: windows-latest
python-version: "3.10"
fail-fast: true
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install Python dependencies
run: |
pip install poetry cffi pytest
poetry install
#- name: Lint with flake8
# run: |
# # stop the build if there are Python syntax errors or undefined names
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Compile native code for the unit tests
run: |
cd tests/test_native_library
cmake -Bbuild .
cmake --build build
- name: Test with pytest
run: |
poetry run pytest tests/ --cov=refcount --cov-report=xml
# - name: Mypy type check
# run: poetry run mypy .
- name: Use Codecov to track coverage
if: matrix.os == 'linux' && matrix.python-version == '3.9'
uses: codecov/codecov-action@v3
with:
files: coverage.xml # coverage report