Skip to content

Commit 45b6f15

Browse files
committed
tidy up build & test infra
1 parent 607faca commit 45b6f15

File tree

4 files changed

+24
-12
lines changed

4 files changed

+24
-12
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ jobs:
2323
- name: Set up Python
2424
uses: actions/setup-python@v4
2525
with:
26-
python-version: "3.10"
26+
python-version: "3.12"
2727

2828
- name: Install dependencies
2929
run: |
3030
python -m pip install -U pylint
3131
3232
- name: Install
3333
run: |
34-
python -m pip install .
34+
python -m pip install .[cli]
3535
3636
- name: Run Lint
3737
run: |
@@ -49,7 +49,7 @@ jobs:
4949
- uses: actions/setup-python@v4
5050
name: Install Python
5151
with:
52-
python-version: "3.10"
52+
python-version: "3.12"
5353

5454
- name: Install dependencies
5555
run: |
@@ -58,8 +58,9 @@ jobs:
5858
- name: Build
5959
run: python -m build
6060

61-
- uses: actions/upload-artifact@v3
61+
- uses: actions/upload-artifact@v4
6262
with:
63+
name: dist
6364
path: |
6465
dist/*.tar.gz
6566
dist/*.whl
@@ -77,9 +78,9 @@ jobs:
7778
# Only publish when a GitHub Release is created.
7879
if: github.event_name == 'release'
7980
steps:
80-
- uses: actions/download-artifact@v3
81+
- uses: actions/download-artifact@v4
8182
with:
82-
name: artifact
83+
name: dist
8384
path: dist
8485

8586
- uses: pypa/gh-action-pypi-publish@release/v1

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
**/__pycache__
22
**/.vscode
3+
**/.venv
34
build/
45
dist/
56
*.egg-info/

src/peakrdl_html/__peakrdl__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from typing import TYPE_CHECKING
22

3-
from peakrdl.plugins.exporter import ExporterSubcommandPlugin #pylint: disable=import-error
4-
from peakrdl.config import schema #pylint: disable=import-error
3+
from peakrdl.plugins.exporter import ExporterSubcommandPlugin
4+
from peakrdl.config import schema
55

66
from .exporter import HTMLExporter
77

test/run.sh

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,21 @@
22

33
set -e
44

5-
this_dir="$( cd "$(dirname "$0")" ; pwd -P )"
6-
cd $this_dir/../
5+
cd "$(dirname "$0")"
6+
7+
# Initialize venv
8+
rm -rf .venv
9+
python3 -m venv .venv
10+
source .venv/bin/activate
11+
12+
# Install test dependencies
13+
pip install -r requirements.txt
14+
15+
# Install dut
16+
pip install -e "../[cli]"
717

818
# Run lint
9-
pylint --rcfile $this_dir/pylint.rc src/peakrdl_html | tee $this_dir/lint.rpt
19+
pylint --rcfile pylint.rc ../src/peakrdl_html
1020

1121
# Run static type checking
12-
mypy src/peakrdl_html
22+
mypy ../src/peakrdl_html

0 commit comments

Comments
 (0)