-
Notifications
You must be signed in to change notification settings - Fork 23
54 lines (45 loc) · 1.65 KB
/
python.yml
File metadata and controls
54 lines (45 loc) · 1.65 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
name: Python CI
on: [push, pull_request]
jobs:
build:
permissions:
pull-requests: write
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
os: ["macos-latest", "ubuntu-latest", "windows-latest"]
runs-on: ${{ matrix.os }}
steps:
- name: "GitHub Checks it out :sunglasses-face:"
uses: actions/checkout@v6.0.2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6.2.0
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Verify Test Case Names Unique
if: runner.os != 'Windows'
run: |
./tests/test_unique_testcase_names.sh
- name: install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Pre-Tests code smell validation
run: |
pycodestyle -v --ignore=E501 bitmath/__init__.py tests/
- name: Lint with pylint
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
run: |
pylint bitmath/__init__.py
- name: Run Unit Tests
run: |
pytest -v --cov=bitmath --cov-report term-missing --cov-report term:skip-covered --cov-report xml:coverage.xml tests
- name: Coverage report on PR
if: github.event_name == 'pull_request' && matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
uses: MishaKav/pytest-coverage-comment@main
with:
pytest-xml-coverage-path: ./coverage.xml
title: "Test Coverage Report"