diff --git a/.forgejo/workflows/testing.yaml b/.forgejo/workflows/testing.yaml new file mode 100644 index 0000000..80a1e38 --- /dev/null +++ b/.forgejo/workflows/testing.yaml @@ -0,0 +1,28 @@ +on: [push] + +env: + GIT_CLONE_PATH: "project" + +jobs: + test: + runs-on: docker + # Note: will require node:20 for running actions/checkout@v4 and actions/cache@v4 + # So... should maybe build a custom image or something? Image registry? + container: + image: python:3.13 + steps: + - name: Download & install uv + run: | + set -ex + curl -LsSf https://astral.sh/uv/install.sh | sh + - name: Clone repository + run: | + set -ex + FORGE_URL="$(echo ${{ github.server_url }}/${{ github.repository }}.git | sed 's#https://##')" + git clone --depth 1 "https://x-access-token:${{ secrets.GITHUB_TOKEN }}@${FORGE_URL}" "${GIT_CLONE_PATH}" + - name: Run tests + run: | + set -ex + . $HOME/.local/bin/env + cd project && uv run pytest +