-
Notifications
You must be signed in to change notification settings - Fork 29
96 lines (86 loc) · 2.86 KB
/
Copy pathtest-ci.yml
File metadata and controls
96 lines (86 loc) · 2.86 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
# This workflow is a re-implementation of the workflow for Travis CI: Tests dpytest.
# Runs every push on any branch and on a PR targeting "master"
name: Test CI
on:
push:
paths-ignore: [ "docs/*", "*.md", ".readthedocs.yml", ".github/dependabot.yml", ".vscode" ]
pull_request:
paths-ignore: [ "docs/*", "*.md", ".readthedocs.yml", ".github/dependabot.yml", ".vscode" ]
branches: [ "master" ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
# don't cancel any remaining jobs when one fails
fail-fast: false
# how you define a matrix strategy
matrix:
# use these pythons
python-version: [ "3.11", "3.12", "3.13", "3.14" ]
steps:
- 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: |
dev-requirements.txt
setup.py
- name: Install dev dependencies
run: python -m pip install -r dev-requirements.txt
- name: Install self (dpytest)
run: python -m pip install .
#- name: Test with pytest
# run: python -m pytest
- name: Test with pytest and coverage
run: coverage run --source=discord/ext/test -m pytest
- name: Report coverage
run: |
coverage report
coverage html
coverage xml
coverage lcov
- name: Upload HTML report
uses: actions/upload-artifact@v5
with:
name: ${{ matrix.python-version }}-cov-htmlcov
path: htmlcov
if-no-files-found: warn
- name: Upload XML report
uses: actions/upload-artifact@v5
with:
name: ${{ matrix.python-version }}-cov-xml
path: coverage.xml
if-no-files-found: warn
- name: Upload LCOV report
uses: actions/upload-artifact@v5
with:
name: ${{ matrix.python-version }}-cov-lcov
path: coverage.lcov
if-no-files-found: warn
mypy:
runs-on: ubuntu-latest
strategy:
# don't cancel any remaining jobs when one fails
fail-fast: false
# how you define a matrix strategy
matrix:
# use these pythons
python-version: [ "3.11", "3.14" ]
steps:
- 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: |
dev-requirements.txt
setup.py
- name: Install dev dependencies
run: python -m pip install -r dev-requirements.txt
- name: Install self (dpytest)
run: python -m pip install .
- name: Run mypy
run: mypy --install-types --non-interactive