-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (33 loc) · 1.04 KB
/
build.yml
File metadata and controls
42 lines (33 loc) · 1.04 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
name: Build Check
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Verify Package Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
enable-cache: true
cache-dependency-glob: "pyproject.toml"
- name: Build package
run: uv build --sdist --wheel --out-dir dist/
- name: List distribution file sizes
run: du -h dist/*
- name: Check distribution metadata
run: uv run --with twine twine check --strict dist/*
- name: Install wheel into isolated directory
run: |
mkdir ./tmp_install
uv pip install --target=./tmp_install $(find dist -type f -name "*.whl" | head -1)
- name: Verify package imports
run: |
PYTHONPATH=./tmp_install uv run python -c "import solarfarmer; print(solarfarmer.__version__)"