42 lines
1.0 KiB
YAML
42 lines
1.0 KiB
YAML
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
# Run tests only if Python files change or this workflow file changes
|
|
- '.gitea/workflows/run-unit-tests.yml'
|
|
- '**/*.py'
|
|
|
|
jobs:
|
|
unit-tests:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v5
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: '3.12'
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -r requirements.txt
|
|
|
|
- name: Run tests
|
|
run: |
|
|
./tests.py
|
|
env:
|
|
AZURE_CLIENT_ID: ${{ vars.AZURE_CLIENT_ID }}
|
|
AZURE_TENANT_ID: ${{ vars.AZURE_TENANT_ID }}
|
|
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
|
|
|
|
# AI: generated... check validity
|
|
# - name: Upload test results
|
|
# if: always()
|
|
# uses: actions/upload-artifact@v2
|
|
# with:
|
|
# name: test-results
|
|
# path: tests/test_results.xml
|