-
Notifications
You must be signed in to change notification settings - Fork 2
110 lines (96 loc) · 2.81 KB
/
Copy pathvalidation.yml
File metadata and controls
110 lines (96 loc) · 2.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
name: Validation
on:
push:
branches:
- '*.x'
- patch/**
paths:
- onecode/**
- tests/**
pull_request:
branches:
- '*.x'
jobs:
formatting:
name: Check Formatting
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install Formatting
run: |
python -m pip install --upgrade pip
pip install flake8
pip install isort
- name: Check Formatting
run: |
flake8 onecode tests/unit/ --exclude=__init__.py,tests/data --max-line-length=100
isort . -m3 --thirdparty . --check-only --skip tests/data
testing:
name: Check Testing
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python: ["3.10", "3.11", "3.12", "3.13", "3.14"]
runs-on: ${{ matrix.os }}
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install Python libraries
run: |
python -m pip install --upgrade pip
pip install .[developer]
- name: Check Testing Linux/MacOS
if: ${{ matrix.os != 'windows-latest' }}
run: |
ONECODE_DO_TYPECHECK=1 python -m pytest tests -n auto
- name: Check Testing Windows
if: ${{ matrix.os == 'windows-latest' }}
run: |
set ONECODE_DO_TYPECHECK=1
python -m pytest tests
coverage:
name: Run coverage report
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
python: ["3.13"]
runs-on: ${{ matrix.os }}
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install Python libraries
run: |
python -m pip install --upgrade pip
pip install .[developer]
- name: Test coverage Linux
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
ONECODE_DO_TYPECHECK=1 coverage run -m pytest tests --cov=./ --cov-report=xml
- name: Test coverage Windows
if: ${{ matrix.os == 'windows-latest' }}
run: |
set ONECODE_DO_TYPECHECK=1
coverage run -m pytest tests --cov=./ --cov-report=xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
fail_ci_if_error: false
name: codecov-umbrella
verbose: true