Skip to content
This repository was archived by the owner on Mar 6, 2026. It is now read-only.

Commit 4f4db7b

Browse files
committed
added github actions
1 parent 0d41115 commit 4f4db7b

2 files changed

Lines changed: 58 additions & 2 deletions

File tree

.github/workflows/unittest.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
on:
2+
pull_request:
3+
branches:
4+
- main
5+
name: unittest
6+
jobs:
7+
unit:
8+
runs-on: ubuntu-22.04
9+
strategy:
10+
matrix:
11+
python: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
- name: Setup Python
16+
uses: actions/setup-python@v5
17+
with:
18+
python-version: ${{ matrix.python }}
19+
- name: Install nox
20+
run: |
21+
python -m pip install --upgrade setuptools pip wheel
22+
python -m pip install nox
23+
- name: Run unit tests
24+
env:
25+
COVERAGE_FILE: .coverage-${{ matrix.python }}
26+
run: |
27+
nox -s unit-${{ matrix.python }}
28+
- name: Upload coverage results
29+
uses: actions/upload-artifact@v4
30+
with:
31+
name: coverage-artifact-${{ matrix.python }}
32+
path: .coverage-${{ matrix.python }}
33+
include-hidden-files: true
34+
35+
cover:
36+
runs-on: ubuntu-latest
37+
needs:
38+
- unit
39+
steps:
40+
- name: Checkout
41+
uses: actions/checkout@v4
42+
- name: Setup Python
43+
uses: actions/setup-python@v5
44+
with:
45+
python-version: "3.13"
46+
- name: Install coverage
47+
run: |
48+
python -m pip install --upgrade setuptools pip wheel
49+
python -m pip install coverage
50+
- name: Download coverage results
51+
uses: actions/download-artifact@v4
52+
with:
53+
path: .coverage-results/
54+
- name: Report coverage results
55+
run: |
56+
find .coverage-results -type f -name '*.zip' -exec unzip {} \;
57+
coverage combine .coverage-results/**/.coverage*
58+
coverage report --show-missing --fail-under=99

noxfile.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@
4242
"lint",
4343
"blacken",
4444
"mypy",
45-
"unit-3.7",
46-
"unit-3.8",
4745
"unit-3.9",
4846
"unit-3.10",
4947
"unit-3.11",

0 commit comments

Comments
 (0)