refactor: convert script to automtu package with CI workflow
https://chatgpt.com/share/697112b2-0410-800f-93ff-9372b603d43f
This commit is contained in:
46
.github/workflows/ci.yml
vendored
Normal file
46
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
test-and-lint:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.12"
|
||||
cache: "pip"
|
||||
|
||||
- name: Install dependencies
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install -e .
|
||||
python -m pip install ruff
|
||||
|
||||
- name: Ruff (lint)
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
ruff check .
|
||||
|
||||
- name: Ruff (format check)
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
ruff format --check .
|
||||
|
||||
- name: Unit tests
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
make test
|
||||
Reference in New Issue
Block a user