Skip to content

Commit 6232ae4

Browse files
ci: use uv and just
1 parent 40f610d commit 6232ae4

File tree

3 files changed

+44
-9
lines changed

3 files changed

+44
-9
lines changed

.github/workflows/test.yml

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,29 @@ jobs:
1414
fail-fast: false
1515
matrix:
1616
include:
17-
- python: 3.8
18-
- python: 3.11
17+
- python: 3.9
18+
- python: 3.13
1919
steps:
2020
- name: Checkout python-evtx with submodules
2121
uses: actions/checkout@v2
2222
with:
2323
submodules: true
24-
- name: Set up Python ${{ matrix.python }}
25-
uses: actions/setup-python@v2
24+
25+
- uses: astral-sh/setup-uv@v5
26+
with:
27+
version: "0.7.2"
28+
python-version: ${{ matrix.python-version }}
29+
30+
- name: install
31+
run: uv sync --all-extras
32+
33+
- uses: extractions/setup-just@v2
2634
with:
27-
python-version: ${{ matrix.python }}
28-
- name: Install python-evtx
29-
run: pip install -e .[test]
30-
- name: Run tests
31-
run: pytest tests/
35+
just-version: 1.5.0
36+
37+
- name: lint
38+
run: just lint
39+
3240

41+
- name: test
42+
run: just test

.justfile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
isort:
2+
uvx isort --length-sort --profile black --line-length 120 Evtx/ tests/ scripts/
3+
4+
black:
5+
uvx black --line-length 120 Evtx/ tests/ scripts/
6+
7+
ruff:
8+
uvx ruff check --line-length 120 Evtx/ tests/ scripts/
9+
10+
mypy:
11+
uvx mypy --check-untyped-defs --ignore-missing-imports Evtx/ tests/ scripts/
12+
13+
lint:
14+
-just isort
15+
-just black
16+
-just ruff
17+
# this doesn't pass cleanly today
18+
#-just mypy
19+
20+
test:
21+
uv run pytest tests/

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ For linting, use ruff:
6464

6565
ruff check Evtx/ scripts/ tests/
6666

67+
Or use [just](https://github.com/casey/just) to run the linters:
68+
69+
just lint
70+
6771
License
6872
-------
6973
python-evtx is licensed under the Apache License, Version 2.0. This means it is freely available for use and modification in a personal and professional capacity.

0 commit comments

Comments
 (0)