Add Gitea Actions CI for all branches #2
No files matched your search
@@ -14,6 +14,9 @@ jobs:
|
|||||||
name: Unit tests
|
name: Unit tests
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
|
# Runner labels do not guarantee the job's OS or installed tools in Gitea.
|
||||||
|
container:
|
||||||
|
image: ghcr.io/catthehacker/ubuntu:act-24.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
@@ -21,10 +24,8 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Show Python version
|
||||||
uses: https://github.com/actions/setup-python@v5
|
run: python3 --version
|
||||||
with:
|
|
||||||
python-version: "3.12"
|
|
||||||
|
|
||||||
- name: Run unit tests
|
- name: Run unit tests
|
||||||
run: python3 -m unittest discover -s tests -v
|
run: python3 -m unittest discover -s tests -v
|
||||||
@@ -270,6 +270,8 @@ The tests use Python's standard library and mock external system commands. They
|
|||||||
|
|
||||||
[Gitea Actions](.gitea/workflows/ci.yaml) runs the same command with Python 3.12 on an `ubuntu-latest` runner for pushes to any branch, pull requests targeting any branch, and manual runs. Repository Actions must be enabled and a runner with that label must be available.
|
[Gitea Actions](.gitea/workflows/ci.yaml) runs the same command with Python 3.12 on an `ubuntu-latest` runner for pushes to any branch, pull requests targeting any branch, and manual runs. Repository Actions must be enabled and a runner with that label must be available.
|
||||||
|
|
||||||
|
The job uses the `ghcr.io/catthehacker/ubuntu:act-24.04` container image, which includes Python 3.12 and Node.js for the checkout action. This makes the job environment independent of the image configured for the runner label and avoids downloading Python builds intended for GitHub-hosted runners.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|||||||
Reference in new issue
Block a user