diff --git a/.forgejo/actions/python/Dockerfile b/.forgejo/actions/python/Dockerfile new file mode 100644 index 0000000..8b7a92c --- /dev/null +++ b/.forgejo/actions/python/Dockerfile @@ -0,0 +1,5 @@ +FROM python:3.12.5 + +ADD *.sh / + +ENTRYPOINT ["/entrypoint.sh"] diff --git a/.forgejo/actions/python/action.yaml b/.forgejo/actions/python/action.yaml new file mode 100644 index 0000000..1b8bd7c --- /dev/null +++ b/.forgejo/actions/python/action.yaml @@ -0,0 +1,5 @@ +name: "Run Python Tests" +description: "Runs the Python Tests" +runs: + using: "docker" + image: "Dockerfile" diff --git a/.forgejo/actions/python/entrypoint.sh b/.forgejo/actions/python/entrypoint.sh new file mode 100755 index 0000000..d5e44d4 --- /dev/null +++ b/.forgejo/actions/python/entrypoint.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +set -e + +python3 -V +python3 tests.py diff --git a/.forgejo/workflows/workflow.yaml b/.forgejo/workflows/workflow.yaml index 10c55c8..f0348c1 100644 --- a/.forgejo/workflows/workflow.yaml +++ b/.forgejo/workflows/workflow.yaml @@ -13,10 +13,6 @@ jobs: runs-on: docker steps: - name: Checkout Repository - uses: https://code.forgejo.org/actions/checkout@v3 - - name: Install Python 3 - uses: https://github.com/actions/setup-python@v5 - with: - python-version: '3.12.2' + uses: https://code.forgejo.org/actions/checkout@v4 - name: Test Code - run: python tests.py + uses: ./.forgejo/actions/python