This uses the python:3.13 docker image and also installs uv beforehand. Checkout is performed "manually" because the standard actions/checkout@v4 action requires node:20 as container, which is annoying. I don't want to pull in node just to clone a git repo. Signed-off-by: Max R. Carrara <max@aequito.sh>
This commit is contained in:
parent
15e01aae8c
commit
fee37c2372
1 changed files with 28 additions and 0 deletions
28
.forgejo/workflows/testing.yaml
Normal file
28
.forgejo/workflows/testing.yaml
Normal file
|
|
@ -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
|
||||
|
||||
Loading…
Add table
Reference in a new issue