Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Added macos-latest to GitHub actions jobs. #82

Added macos-latest to GitHub actions jobs.

Added macos-latest to GitHub actions jobs. #82

Workflow file for this run

name: CI Tests
on:
- push
- pull_request
- workflow_dispatch
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
py: ['3.9', '3.11']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.py }}
- name: Install dependencies
run: |
python -m pip install ".[test]"
- name: Run the unit tests
shell: bash
run: |
coverage run -p -m unittest discover -b tests
- name: Run the Python linter
run: |
prospector
- name: Upload coverage artifact
uses: actions/upload-artifact@v4
with:
name: coverage-${{ github.run_id }}-${{ matrix.os }}-${{ matrix.py }}
path: .coverage.*
include-hidden-files: true
upload-coverage:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3'
check-latest: true
- name: Download coverage artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Combine coverage files
run: |
python -m pip install ".[test]"
find artifacts -name ".coverage.*" -exec mv {} . \;
coverage combine
coverage xml
coverage report
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
build-doc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3'
check-latest: true
- name: Build documentation
run: |
python -m pip install ".[docs]"
sphinx-build -W -b html docs docs/_build/html
sphinx-build -W -b doctest docs docs/_build/doctest
sphinx-build -W -b linkcheck docs docs/_build/linkcheck