Set up forgejo actions #1
2 changed files with 43 additions and 1 deletions
41
.forgejo/workflows/test.yml
Normal file
41
.forgejo/workflows/test.yml
Normal file
|
@ -0,0 +1,41 @@
|
|||
name: Run tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-24.04
|
||||
strategy:
|
||||
matrix:
|
||||
python-version:
|
||||
- '3.12'
|
||||
- '3.13'
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
.mypy_cache
|
||||
.ruff_cache
|
||||
~/.cache/pypoetry
|
||||
~/.cache/pip
|
||||
key: ${{ runner.os }}-poetry-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-poetry-${{ matrix.python-version }}-
|
||||
- run: pip install --break-system-packages poetry
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
cache: poetry
|
||||
- name: Install deps
|
||||
run: make dev
|
||||
- name: Run tests
|
||||
run: make ci
|
3
Makefile
3
Makefile
|
@ -26,7 +26,8 @@ lint:
|
|||
|
||||
test:
|
||||
poetry run mypy .
|
||||
poetry run pytest
|
||||
# No tests yet lol
|
||||
# poetry run pytest
|
||||
|
||||
# Faster tests, only running what's changed
|
||||
test-fast:
|
||||
|
|
Loading…
Add table
Reference in a new issue