Skip to content

Commit

Permalink
ci: use uv
Browse files Browse the repository at this point in the history
  • Loading branch information
sushichan044 committed Nov 10, 2024
1 parent a4c651c commit 78e6c83
Showing 1 changed file with 21 additions and 16 deletions.
37 changes: 21 additions & 16 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: check

on:
push:
pull_request:
types:
- opened
Expand All @@ -12,32 +11,38 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

defaults:
run:
shell: bash

jobs:
check:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
timeout-minutes: 5
permissions:
contents: read

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: setup CPython
uses: actions/setup-python@v5
- name: Install uv
uses: astral-sh/setup-uv@2e657c127d5b1635d5a8e3fa40e0ac50a5bf6992 # v3.2.2
with:
cache: "pip"
cache-dependency-path: "requirements-dev.lock"
python-version-file: ".python-version"
version: "0.5.0"
enable-cache: true

- name: Set up Python
run: uv python install

- name: install dependencies
- name: Install dependencies
id: install
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.lock
uv sync --dev --frozen
- name: lint
if: ${{ always() && steps.install.outcome == 'success' }}
run: |
ruff check --output-format github .
uv run ruff check --output-format github .
- name: format
if: ${{ always() && steps.install.outcome == 'success' }}
- name: check format
run: |
ruff format --check .
uv run ruff format --check .

0 comments on commit 78e6c83

Please sign in to comment.