-
Notifications
You must be signed in to change notification settings - Fork 1
122 lines (100 loc) · 3.52 KB
/
Copy pathci.yml
File metadata and controls
122 lines (100 loc) · 3.52 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
name: CI
on:
merge_group:
pull_request:
push:
branches:
- main
schedule:
# At 04:44 on Monday, see https://crontab.guru/
- cron: "44 4 * * 1"
permissions:
contents: read
jobs:
lint:
name: Lint
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Install uv and set the python version
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
with:
python-version: "3.11"
- name: Install lint group
run: uv sync --locked --only-group lint
- name: Run prek
run: |
uv run --locked --only-group lint \
prek -c prek.toml run --all-files --show-diff-on-failure
test:
name: Test (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0
persist-credentials: false
- name: Install system packages
run: |
sudo apt-get update
sudo apt-get install -y \
fuse3 libfuse3-dev pkg-config \
plink1.9 plink2
- name: Install uv
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: uv sync --locked --group test --no-default-groups
- name: Test console script entry point
run: |
uv run biofuse --help
- name: Run tests with coverage
run: uv run pytest --cov=biofuse --cov-report=term-missing
# FIXME dropping for now
# - name: Upload coverage to Coveralls
# uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b # v2.3.6
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# # The first coveralls upload will succeed and others seem to fail now.
# # This is a quick workaround for doing a proper "parallel" setup:
# # https://github.com/coverallsapp/github-action
# fail-on-error: false
packaging:
name: Packaging
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0
persist-credentials: false
# Needed to install pyfuse3, which builds from source.
- name: Install system packages
run: |
sudo apt-get update
sudo apt-get install -y fuse3 libfuse3-dev pkg-config
- name: Install uv and set the python version
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
with:
python-version: "3.12"
- name: Install packaging deps
run: uv sync --locked --group packaging --no-default-groups
- name: Validate pyproject
run: uv run --locked --group packaging --no-default-groups validate-pyproject pyproject.toml -v
- name: Build artefacts
run: uv build
- name: Twine check
run: uv run --locked --group packaging --no-default-groups twine check --strict dist/*
- name: Install into venv
run: |
uv venv cli-test
uv pip install --python=cli-test dist/*.whl
- name: Check biofuse CLI
run: |
./cli-test/bin/biofuse --help