nvm composite action doesnt work
This commit is contained in:
30
.github/actions/setup-uv-python/action.yml
vendored
30
.github/actions/setup-uv-python/action.yml
vendored
@@ -1,30 +0,0 @@
|
||||
name: "Setup Python + uv + sync"
|
||||
description: "Checkout, install uv, and uv sync (with optional groups, default Python 3.10)"
|
||||
inputs:
|
||||
python-version:
|
||||
description: "Python version to use"
|
||||
required: false
|
||||
default: "3.10"
|
||||
groups:
|
||||
description: "Comma-separated uv groups to sync (e.g. 'dev,docs'). Leave blank for default deps only."
|
||||
required: false
|
||||
default: ""
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup UV
|
||||
uses: astral-sh/setup-uv@v6
|
||||
|
||||
- name: Sync environment
|
||||
shell: bash
|
||||
run: |
|
||||
GROUP_FLAGS=()
|
||||
if [ -n "${{ inputs.groups }}" ]; then
|
||||
IFS=',' read -ra G <<< "${{ inputs.groups }}"
|
||||
for g in "${G[@]}"; do GROUP_FLAGS+=( "--group" "$(echo $g | xargs)" ); done
|
||||
fi
|
||||
uv sync "${GROUP_FLAGS[@]}" --python "${{ inputs.python-version }}"
|
||||
67
.github/workflows/build.yml
vendored
67
.github/workflows/build.yml
vendored
@@ -30,15 +30,21 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- uses: ./.github/actions/setup-uv-python
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Setup UV
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
groups: "test"
|
||||
enable-cache: true
|
||||
python-version: ${{ inputs.python-version }}
|
||||
install-uv: true
|
||||
|
||||
- name: Test
|
||||
run: |
|
||||
uv sync --all-extras --group test
|
||||
cd tests
|
||||
pytest --cov=peakrdl_busdecoder --synth-tool skip --sim-tool stub
|
||||
uvx pytest --cov=peakrdl_busdecoder --synth-tool skip --sim-tool stub
|
||||
|
||||
- name: Coveralls
|
||||
env:
|
||||
@@ -46,16 +52,18 @@ jobs:
|
||||
COVERALLS_PARALLEL: true
|
||||
run: |
|
||||
cd tests
|
||||
coveralls --service=github
|
||||
uvx coveralls --service=github
|
||||
|
||||
finish_coveralls:
|
||||
needs: test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v4
|
||||
- name: Setup UV
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
python-version: 3.x
|
||||
enable-cache: true
|
||||
python-version: "3.10"
|
||||
install-uv: true
|
||||
|
||||
- name: Coveralls
|
||||
env:
|
||||
@@ -63,17 +71,22 @@ jobs:
|
||||
COVERALLS_PARALLEL: true
|
||||
run: |
|
||||
python -m pip install coveralls>=3.0.0
|
||||
coveralls --service=github --finish
|
||||
uvx coveralls --service=github --finish
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
format:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup (Python + uv + sync)
|
||||
uses: ./.github/actions/setup-uv-python
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Setup UV
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
enable-cache: true
|
||||
python-version: "3.10"
|
||||
groups: "tools"
|
||||
install-uv: true
|
||||
|
||||
- name: Ruff format (check only)
|
||||
run: uvx ruff format --check .
|
||||
|
||||
@@ -81,11 +94,16 @@ jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup (Python + uv + sync)
|
||||
uses: ./.github/actions/setup-uv-python
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Setup UV
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
enable-cache: true
|
||||
python-version: "3.10"
|
||||
groups: "tools"
|
||||
install-uv: true
|
||||
|
||||
- name: Ruff lint
|
||||
run: uvx ruff check --output-format=github .
|
||||
|
||||
@@ -93,10 +111,16 @@ jobs:
|
||||
typecheck:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup (Python + uv + sync)
|
||||
uses: ./.github/actions/setup-uv-python
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Setup UV
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
enable-cache: true
|
||||
python-version: "3.10"
|
||||
install-uv: true
|
||||
|
||||
- name: Pyrefly type check
|
||||
run: uvx pyrefly check --summarize-errors
|
||||
|
||||
@@ -110,10 +134,15 @@ jobs:
|
||||
name: Build distributions
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup (Python + uv + sync)
|
||||
uses: ./.github/actions/setup-uv-python
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Setup UV
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
enable-cache: true
|
||||
python-version: "3.10"
|
||||
install-uv: true
|
||||
|
||||
- name: Build Package
|
||||
run: uv build
|
||||
|
||||
Reference in New Issue
Block a user