intent/.forgejo/workflows/ci.yml

31 lines
802 B
YAML
Raw Normal View History

name: ci
on:
push:
pull_request:
jobs:
test:
# Adjust to match the labels of your Forgejo runner.
runs-on: docker
steps:
- uses: https://data.forgejo.org/actions/checkout@v4
- uses: https://github.com/astral-sh/setup-uv@v6
with:
version: "0.13.6"
- run: uv sync --locked
- run: uv run ruff check .
- run: uv run ruff format --check .
- run: uv run pytest
deploy:
needs: test
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: docker
steps:
- uses: https://data.forgejo.org/actions/checkout@v4
- uses: https://github.com/superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}