Skip to content

Commit 6ebd80f

Browse files
authored
fea: add nightly test (#103)
1 parent dd70a7a commit 6ebd80f

3 files changed

Lines changed: 51 additions & 2 deletions

File tree

.github/workflows/nightly-test.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Nightly Test Suite
2+
3+
on:
4+
schedule:
5+
- cron: '0 8 * * *'
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
14+
strategy:
15+
matrix:
16+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
17+
18+
steps:
19+
- uses: actions/checkout@v5
20+
21+
- name: Set up Python ${{ matrix.python-version }}
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
check-latest: true
26+
allow-prereleases: true
27+
28+
- name: Install dependencies
29+
continue-on-error: true
30+
run: |
31+
python -m pip install --upgrade pip
32+
pip install flake8 mypy
33+
if [ -f requirements/requirements-test.txt ]; then pip install -r requirements/requirements-test.txt; fi
34+
35+
- name: Lint with flake8
36+
run: |
37+
# Stop the build if there are Python syntax errors or undefined names
38+
flake8 ./objwatch ./examples --count --select=E9,F63,F7,F82 --show-source --statistics
39+
# Exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
40+
flake8 ./objwatch ./examples --count --exit-zero --max-complexity=16 --max-line-length=127 --statistics
41+
42+
- name: Type check with mypy
43+
run: |
44+
# Run mypy type checker
45+
mypy ./objwatch --ignore-missing-imports
46+
47+
- name: Test with pytest
48+
run: |
49+
python -m pytest tests

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ObjWatch
22

3-
[![Python Test Status](https://github.com/aeeeeeep/objwatch/actions/workflows/python-test.yml/badge.svg)](https://github.com/aeeeeeep/objwatch/actions/workflows/python-test.yml)
3+
[![Nightly Test Status](https://github.com/aeeeeeep/objwatch/actions/workflows/nightly-test.yml/badge.svg)](https://github.com/aeeeeeep/objwatch/actions/workflows/nightly-test.yml)
44
[![Documentation](https://img.shields.io/badge/docs-latest-green.svg?style=flat)](https://objwatch.readthedocs.io)
55
[![License](https://img.shields.io/github/license/aeeeeeep/objwatch)](LICENSE)
66
[![PyPI](https://img.shields.io/pypi/v/objwatch)](https://pypi.org/project/objwatch)

README_zh.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ObjWatch
22

3-
[![Python Test Status](https://github.com/aeeeeeep/objwatch/actions/workflows/python-test.yml/badge.svg)](https://github.com/aeeeeeep/objwatch/actions/workflows/python-test.yml)
3+
[![Nightly Test Status](https://github.com/aeeeeeep/objwatch/actions/workflows/nightly-test.yml/badge.svg)](https://github.com/aeeeeeep/objwatch/actions/workflows/nightly-test.yml)
44
[![Documentation](https://img.shields.io/badge/docs-latest-green.svg?style=flat)](https://objwatch.readthedocs.io)
55
[![License](https://img.shields.io/github/license/aeeeeeep/objwatch)](LICENSE)
66
[![PyPI](https://img.shields.io/pypi/v/objwatch)](https://pypi.org/project/objwatch)

0 commit comments

Comments
 (0)