Skip to content

Test Seiri

Test Seiri #66

Workflow file for this run

name: seiri_test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
main:
name: Test Seiri on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
os: [ubuntu-latest, macOS-latest, windows-latest]
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[test]
- name: Test with pytest
run: |
coverage run -m pytest -v -s
mv .coverage .coverage.${{ matrix.python-version }}.${{ matrix.os }}
- name: Store coverage files
uses: actions/upload-artifact@v3
with:
name: coverage
path: .coverage.${{ matrix.python-version }}.${{ matrix.os }}
report-coverage:
name: Generate Coverage Report
runs-on: ubuntu-latest
needs: main
steps:
- name: Checkout this repository
uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: Download coverage files
uses: actions/download-artifact@v3
with:
name: coverage
path: coverage
- name: List down all coverage artifacts
run: |
ls -R ./coverage
- name: Combine coverage files
run: |
pip install coverage
coverage combine coverage
coverage report
- name: Push Coverage results
uses: codacy/codacy-coverage-reporter-action@v1
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: .coverage