45 lines
1.2 KiB
YAML
45 lines
1.2 KiB
YAML
name: Validating
|
|
run-name: ${{ github.actor }} is runs ci pipeline
|
|
on: push
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
RUNNER_TOOL_CACHE: /toolcache
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v5
|
|
with:
|
|
github-token: ${{ secrets._GITHUB_TOKEN }}
|
|
enable-cache: true
|
|
|
|
- name: Set up Python
|
|
run: uv python install
|
|
|
|
- name: Cache uv
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ${{ github.workspace }}/.cache/uv
|
|
key: uv-cache-${{ runner.os }}
|
|
restore-keys: uv-cache-${{ runner.os }}
|
|
|
|
- name: Install the project
|
|
run: uv sync --no-install-project --cache-dir ${{ github.workspace }}/.cache/uv
|
|
|
|
- name: Cache pre-commit
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ~/.cache/pre-commit
|
|
key: pre-commit-cache-${{ runner.os }}-${{ hashFiles('.pre-commit-config.yaml') }}
|
|
restore-keys: pre-commit-cache-${{ runner.os }}-
|
|
|
|
- name: Linter & Formatter
|
|
run: uv run pre-commit run --all-files
|