mirror of
https://github.com/PRVTPRO/Amnezia-Web-Panel.git
synced 2026-09-18 01:44:10 +02:00
89d895baac
The repository already ships 70 stdlib unittest cases under tests/, but .github/workflows/build.yml only builds PyInstaller binaries and images, so a regression never fails a PR. This adds a tiny Tests workflow that installs requirements.txt and runs `python -m unittest discover -s tests` on pushes to main, on every pull request and on demand. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
31 lines
524 B
YAML
31 lines
524 B
YAML
name: Tests
|
|
|
|
on:
|
|
push:
|
|
branches: [ "main" ]
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
unittest:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.11'
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -r requirements.txt
|
|
|
|
- name: Run unit tests
|
|
run: python -m unittest discover -s tests -v
|