Skip to content

Commit a096c08

Browse files
committed
ci: update actions & add lint
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
1 parent dc9ad00 commit a096c08

3 files changed

Lines changed: 48 additions & 41 deletions

File tree

.github/workflows/doc.yml

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,15 @@ jobs:
1111
- name: Checkout code
1212
uses: actions/checkout@v2
1313

14-
- name: Set up Python 3.9
15-
uses: actions/setup-python@v2
14+
- name: Set up Python 3.10
15+
uses: actions/setup-python@v4
1616
with:
17-
python-version: 3.9
18-
19-
- name: Configure pip cache
20-
uses: actions/cache@v2
21-
with:
22-
path: ~/.cache/pip
23-
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/*') }}
24-
restore-keys: ${{ runner.os }}-pip-
17+
python-version: '3.10'
2518

2619
- name: Install dependencies
2720
run: |
2821
python -m pip install --upgrade pip
29-
pip install -r requirements/dev.txt
30-
pip install -r requirements/docs.txt
22+
pip install -r requirements/dev.txt -r requirements/docs.txt
3123
3224
- name: Build sphinx documentation
3325
run: |
@@ -36,9 +28,9 @@ jobs:
3628
touch build/sphinx/html/.nojekyll
3729
3830
- name: Deploy docs to gh-pages
39-
uses: JamesIves/github-pages-deploy-action@3.7.1
31+
uses: JamesIves/github-pages-deploy-action@v4
4032
with:
41-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42-
BRANCH: gh-pages
43-
FOLDER: build/sphinx/html
44-
SINGLE_COMMIT: true
33+
token: ${{ secrets.GITHUB_TOKEN }}
34+
branch: gh-pages
35+
folder: build/sphinx/html
36+
single-commit: true

.github/workflows/release.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,20 @@ jobs:
1212
- name: Checkout code
1313
uses: actions/checkout@v2
1414

15-
- name: Set up Python 3.9
16-
uses: actions/setup-python@v2
15+
- name: Set up Python 3.10
16+
uses: actions/setup-python@v4
1717
with:
18-
python-version: 3.9
18+
python-version: '3.10'
1919

2020
- name: Install dependencies
2121
run: |
2222
# install deps required for building sdist/wheels
2323
python -m pip install --upgrade pip
24-
pip install -r requirements/dist.txt
25-
pip install -r requirements/test.txt
24+
pip install -r requirements/dist.txt -r requirements/test.txt
2625
2726
- name: Test with pytest
28-
# forcibly enable pytest colors
2927
env:
30-
PY_COLORS: 1
28+
PY_COLORS: 1 # forcibly enable pytest colors
3129
run: python setup.py test
3230

3331
- name: Build sdist

.github/workflows/test.yml

Lines changed: 34 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,34 +7,33 @@ on:
77
branches: [main]
88

99
jobs:
10-
build:
10+
test:
1111
runs-on: ${{ matrix.os }}
1212
continue-on-error: ${{ matrix.experimental }}
1313
strategy:
1414
matrix:
15-
os: [ubuntu-latest, macos-latest]
15+
os: [ubuntu-latest]
1616
python-version: ['3.8', '3.9', '3.10']
1717
experimental: [false]
1818
include:
1919
- os: ubuntu-latest
2020
python-version: '3.11.0-beta - 3.11'
2121
experimental: true
22+
- os: macos-latest
23+
python-version: '3.10'
24+
experimental: false
25+
fail-fast: false
2226

2327
steps:
2428
- name: Checkout code
25-
uses: actions/checkout@v2
29+
uses: actions/checkout@v3
2630

2731
- name: Set up Python ${{ matrix.python-version }}
28-
uses: actions/setup-python@v2
32+
uses: actions/setup-python@v4
2933
with:
3034
python-version: ${{ matrix.python-version }}
31-
32-
- name: Configure pip cache
33-
uses: actions/cache@v2
34-
with:
35-
path: ~/.cache/pip
36-
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/*') }}
37-
restore-keys: ${{ runner.os }}-pip-
35+
cache: 'pip'
36+
cache-dependency-path: requirements/*.txt
3837

3938
# experimental targets generally lack lxml wheels
4039
- name: Install libxml2 and libxslt development packages
@@ -52,19 +51,37 @@ jobs:
5251
- name: Install deps
5352
run: |
5453
python -m pip install --upgrade pip
55-
pip install -r requirements/test.txt
56-
pip install -r requirements/ci.txt
54+
pip install -r requirements/test.txt -r requirements/ci.txt
5755
pip install .
5856
5957
- name: Test with pytest
60-
# forcibly enable pytest colors
6158
env:
62-
PY_COLORS: 1
59+
PY_COLORS: 1 # forcibly enable pytest colors
6360
run: |
6461
pytest --cov --cov-report=term --cov-report=xml -v
6562
6663
- name: Submit code coverage to codecov
6764
if: ${{ matrix.os == 'ubuntu-latest' }}
68-
uses: codecov/codecov-action@v1
65+
uses: codecov/codecov-action@v3
66+
with:
67+
files: ./coverage.xml
68+
69+
lint:
70+
runs-on: ubuntu-latest
71+
steps:
72+
- name: Checkout code
73+
uses: actions/checkout@v3
74+
75+
- name: Set up Python 3
76+
uses: actions/setup-python@v4
6977
with:
70-
file: ./coverage.xml
78+
python-version: '3.x'
79+
80+
- name: Install dependencies
81+
run: |
82+
python -m pip install --upgrade pip
83+
pip install -r requirements/dev.txt pylint
84+
85+
- name: Run linting tools
86+
run: |
87+
pylint --exit-zero src/pkgdev

0 commit comments

Comments
 (0)