Skip to content

ci: add test.yml

ci: add test.yml #1

Workflow file for this run

name: test
on:
push:
pull_request:
workflow_dispatch:
defaults:
run:
shell: bash
jobs:
test:
runs-on: ubuntu-22.04
steps:
- name: Check out the repository
uses: actions/checkout@v4
- name: Read and Set Python Version
id: set-python-version
run: echo "python_version=$(cat .python-version)" >> "$GITHUB_OUTPUT"
- name: Install the latest version of rye
uses: eifinger/setup-rye@v3
id: setup-rye
with:
enable-cache: true
cache-prefix: ${{ steps.set-python-version.outputs.python_version }}
- name: Pin python-version ${{ steps.set-python-version.outputs.python_version }}
if: steps.setup-rye.outputs.cache-hit != 'true'
run: rye pin ${{ steps.set-python-version.outputs.python_version }}
- name: Install dependencies
if: steps.setup-rye.outputs.cache-hit != 'true'
run: |
rye sync --no-lock
- name: Run Checks
run: |
rye lint
rye format --check