-
Notifications
You must be signed in to change notification settings - Fork 6
76 lines (64 loc) · 1.82 KB
/
pullRequestWorkflow.yml
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
name: "Checking if the PR can be merged"
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
changelog-enforcer:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dangoslen/changelog-enforcer@v3
with:
changeLogPath: './Changelog.md'
documentation-coverage:
runs-on: ubuntu-latest
needs: changelog-enforcer
steps:
- uses: actions/checkout@v3
- name: Set Up Python 3.8
uses: actions/setup-python@v3
with:
python-version: 3.8
- name: Install requisites
run: python -m pip install --upgrade pip
- name: Install pandoc
run: sudo apt install -y pandoc
- name: Install hatch
run: python -m pip install hatch
- name: check test coverage
run: python -m hatch run docs:cov
test:
runs-on: ubuntu-latest
needs: changelog-enforcer
strategy:
matrix:
# Run in all these versions of Python
python-version: [3.8, 3.9, "3.10"]
steps:
- uses: actions/checkout@v3
# Setup which version of Python to use
- name: Set Up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
# Display the Python version being used
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install requisites
run: |
python -m pip install --upgrade pip hatch
- name: Run tests
run: hatch run test.py${{ matrix.python-version }}:no-cov
check-linted:
runs-on: ubuntu-latest
needs: changelog-enforcer
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: psf/black@stable
with:
src: "./src"