-
Notifications
You must be signed in to change notification settings - Fork 1
93 lines (76 loc) · 2.3 KB
/
Copy pathtests.yml
File metadata and controls
93 lines (76 loc) · 2.3 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
---
name: Tests
on: # yamllint disable-line rule:truthy
push: null
pull_request: null
permissions: {}
jobs:
docs:
name: Build documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Install miniforge
uses: conda-incubator/setup-miniconda@v4
with:
miniforge-version: latest
environment-file: docs/environment.yml
activate-environment: sphinx
- name: Run sphinx
shell: bash -l {0}
run: |
cd docs && make SPHINXOPTS="-W" html
lint:
name: Lint
runs-on: ubuntu-latest
permissions:
contents: read
packages: read
# To report GitHub Actions status checks
statuses: write
steps:
- name: Checkout code
uses: actions/checkout@v7
with:
# super-linter needs the full git history to get the
# list of files that changed across commits
fetch-depth: 0
- name: Super-linter
uses: super-linter/super-linter@v8
env:
# To report GitHub Actions status checks
LINTER_RULES_PATH: .
DEFAULT_BRANCH: master
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VALIDATE_PYTHON_FLAKE8: true
PYTHON_FLAKE8_CONFIG_FILE: .flake8
VALIDATE_JSON: true
VALIDATE_YAML: true
YAML_CONFIG_FILE: .yamllint.yml
test:
name: Run tests & display coverage
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
permissions:
# Gives the action the necessary permissions for publishing new
# comments in pull requests.
pull-requests: write
# Gives the action the necessary permissions for pushing data to the
# python-coverage-comment-action branch, and for editing existing
# comments (to avoid publishing multiple comments in the same PR)
contents: write
steps:
- uses: actions/checkout@v7
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install package and dependencies
run: |
python -m pip install --upgrade pip
pip install .[test]
- name: Run tests
run: pytest