ci: migrate workflows from Forgejo to Gitea Actions
This commit is contained in:
72
.gitea/workflows/ci.yaml
Normal file
72
.gitea/workflows/ci.yaml
Normal file
@@ -0,0 +1,72 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
env:
|
||||
PIP_CACHE_DIR: ${{ github.workspace }}/.cache/pip
|
||||
PYTHONUNBUFFERED: "1"
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: [linux, docker]
|
||||
container:
|
||||
image: catthehacker/ubuntu:act-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.12'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements-dev.txt
|
||||
- name: Run ruff
|
||||
run: ruff check app tests scripts
|
||||
- name: Run black
|
||||
run: black --check app tests scripts
|
||||
|
||||
type-check:
|
||||
runs-on: [linux, docker]
|
||||
container:
|
||||
image: catthehacker/ubuntu:act-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.12'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
set -x
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements-dev.txt
|
||||
pip list
|
||||
- name: Run mypy
|
||||
run: |
|
||||
echo "Running mypy on core modules..."
|
||||
mypy app/core app/models app/strategies app/services app/domain --show-error-codes --show-traceback
|
||||
echo "Type check completed successfully"
|
||||
|
||||
test:
|
||||
runs-on: [linux, docker]
|
||||
container:
|
||||
image: mcr.microsoft.com/playwright:v1.58.0-jammy
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.12'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
set -x
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements-dev.txt
|
||||
pip list
|
||||
- name: Run tests
|
||||
run: pytest -v --tb=short
|
||||
Reference in New Issue
Block a user