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 }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: ./.github/actions/setup-uv-python
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
|
- name: Setup UV
|
||||||
|
uses: astral-sh/setup-uv@v6
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
enable-cache: true
|
||||||
groups: "test"
|
python-version: ${{ inputs.python-version }}
|
||||||
|
install-uv: true
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: |
|
run: |
|
||||||
|
uv sync --all-extras --group test
|
||||||
cd tests
|
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
|
- name: Coveralls
|
||||||
env:
|
env:
|
||||||
@@ -46,16 +52,18 @@ jobs:
|
|||||||
COVERALLS_PARALLEL: true
|
COVERALLS_PARALLEL: true
|
||||||
run: |
|
run: |
|
||||||
cd tests
|
cd tests
|
||||||
coveralls --service=github
|
uvx coveralls --service=github
|
||||||
|
|
||||||
finish_coveralls:
|
finish_coveralls:
|
||||||
needs: test
|
needs: test
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Python
|
- name: Setup UV
|
||||||
uses: actions/setup-python@v4
|
uses: astral-sh/setup-uv@v6
|
||||||
with:
|
with:
|
||||||
python-version: 3.x
|
enable-cache: true
|
||||||
|
python-version: "3.10"
|
||||||
|
install-uv: true
|
||||||
|
|
||||||
- name: Coveralls
|
- name: Coveralls
|
||||||
env:
|
env:
|
||||||
@@ -63,17 +71,22 @@ jobs:
|
|||||||
COVERALLS_PARALLEL: true
|
COVERALLS_PARALLEL: true
|
||||||
run: |
|
run: |
|
||||||
python -m pip install coveralls>=3.0.0
|
python -m pip install coveralls>=3.0.0
|
||||||
coveralls --service=github --finish
|
uvx coveralls --service=github --finish
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
format:
|
format:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Setup (Python + uv + sync)
|
- name: Checkout
|
||||||
uses: ./.github/actions/setup-uv-python
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
|
- name: Setup UV
|
||||||
|
uses: astral-sh/setup-uv@v6
|
||||||
with:
|
with:
|
||||||
|
enable-cache: true
|
||||||
python-version: "3.10"
|
python-version: "3.10"
|
||||||
groups: "tools"
|
install-uv: true
|
||||||
|
|
||||||
- name: Ruff format (check only)
|
- name: Ruff format (check only)
|
||||||
run: uvx ruff format --check .
|
run: uvx ruff format --check .
|
||||||
|
|
||||||
@@ -81,11 +94,16 @@ jobs:
|
|||||||
lint:
|
lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Setup (Python + uv + sync)
|
- name: Checkout
|
||||||
uses: ./.github/actions/setup-uv-python
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
|
- name: Setup UV
|
||||||
|
uses: astral-sh/setup-uv@v6
|
||||||
with:
|
with:
|
||||||
|
enable-cache: true
|
||||||
python-version: "3.10"
|
python-version: "3.10"
|
||||||
groups: "tools"
|
install-uv: true
|
||||||
|
|
||||||
- name: Ruff lint
|
- name: Ruff lint
|
||||||
run: uvx ruff check --output-format=github .
|
run: uvx ruff check --output-format=github .
|
||||||
|
|
||||||
@@ -93,10 +111,16 @@ jobs:
|
|||||||
typecheck:
|
typecheck:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Setup (Python + uv + sync)
|
- name: Checkout
|
||||||
uses: ./.github/actions/setup-uv-python
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
|
- name: Setup UV
|
||||||
|
uses: astral-sh/setup-uv@v6
|
||||||
with:
|
with:
|
||||||
|
enable-cache: true
|
||||||
python-version: "3.10"
|
python-version: "3.10"
|
||||||
|
install-uv: true
|
||||||
|
|
||||||
- name: Pyrefly type check
|
- name: Pyrefly type check
|
||||||
run: uvx pyrefly check --summarize-errors
|
run: uvx pyrefly check --summarize-errors
|
||||||
|
|
||||||
@@ -110,10 +134,15 @@ jobs:
|
|||||||
name: Build distributions
|
name: Build distributions
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Setup (Python + uv + sync)
|
- name: Checkout
|
||||||
uses: ./.github/actions/setup-uv-python
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
|
- name: Setup UV
|
||||||
|
uses: astral-sh/setup-uv@v6
|
||||||
with:
|
with:
|
||||||
|
enable-cache: true
|
||||||
python-version: "3.10"
|
python-version: "3.10"
|
||||||
|
install-uv: true
|
||||||
|
|
||||||
- name: Build Package
|
- name: Build Package
|
||||||
run: uv build
|
run: uv build
|
||||||
|
|||||||
Reference in New Issue
Block a user