-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (53 loc) · 1.72 KB
/
Copy pathci.yml
File metadata and controls
57 lines (53 loc) · 1.72 KB
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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev,network,advanced]"
- name: Lint
run: ruff check src/ tests/
- name: Test with coverage
run: pytest tests/ --cov=src/acorn --cov-report=term-missing
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: |
pip install pyinstaller
pip install -e ".[network,advanced]"
- name: Build with PyInstaller
run: |
pyinstaller --onefile --name acorn \
--add-data "src/acorn/templates:acorn/templates" \
--add-data "src/acorn/detectors:acorn/detectors" \
--add-data "src/acorn/locales:acorn/locales" \
--hidden-import acorn.json_output \
--hidden-import acorn.analysis.health \
--hidden-import acorn.analysis.health_rules \
--hidden-import acorn.analysis.insights \
--hidden-import acorn.commands.doctor \
--hidden-import acorn.commands.fix \
--hidden-import acorn.generators.builtin \
src/acorn/cli.py
- name: Smoke test
run: ./dist/acorn --help