Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
name: Test

on:
pull_request:
push:
branches:
- master
workflow_dispatch:

jobs:
Build:
name: KiCAD ${{ matrix.kicad-version }}

strategy:
matrix:
os:
- Ubuntu
kicad-version:
- "8.0"
- "9.0"

runs-on: ${{ matrix.os }}-latest
container:
image: kicad/kicad:${{ matrix.kicad-version }}
options: --user root

steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Set up build environment
shell: bash
run: |
apt update && apt install -y python3-pip
python3 -m pip install --break-system-packages --upgrade hatch

- name: Test
run: hatch -v run pytest -vv tests

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
7 changes: 6 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,12 @@ path = "InteractiveHtmlBom/version.py"
pattern = "LAST_TAG = 'v(?P<version>[^']+)'"

[tool.hatch.envs.default]
dependencies = ["coverage[toml]>=6.5", "pytest"]
system-packages = true
dependencies = [
"coverage[toml]>=6.5",
"pytest",
"pytest-sugar"
]
[tool.hatch.envs.default.scripts]
test = "pytest {args:tests}"
test-cov = "coverage run -m pytest {args:tests}"
Expand Down
2 changes: 2 additions & 0 deletions tests/test_module.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
def test_module_import():
import InteractiveHtmlBom # noqa