-
-
Notifications
You must be signed in to change notification settings - Fork 29
63 lines (54 loc) · 1.61 KB
/
lint-and-tests.yml
File metadata and controls
63 lines (54 loc) · 1.61 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
# This is a basic workflow to help you get started with Actions
name: "🐍 Lint and Test"
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
pull_request:
branches:
- main
paths-ignore:
- "docs/**"
push:
branches:
- main
paths-ignore:
- "docs/**"
# Sets permissions of the GITHUB_TOKEN
permissions:
contents: read
jobs:
lintest:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
- "3.10"
- "3.11"
- "3.12"
- "3.13"
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Get source code
uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: pyproject.toml
- name: Upgrade installation dependencies
run: python -m pip install --upgrade pip setuptools wheel
- name: Install project as a package
run: python -m pip install .[test]
- name: Run Unit tests
run: python -m pytest
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v6.0.0
with:
env_vars: PYTHON
flags: unittests
name: Code Coverage for unittests on python-${{ matrix.python-version }}]
env:
PYTHON: ${{ matrix.python-version }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}