BW3-Core/.github/workflows/run_pytest.yml
Bastian Schroll a6c3395f39
Potential fix for code scanning alert no. 2: Workflow does not contain permissions
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-11-17 10:18:08 +01:00

41 lines
844 B
YAML

name: pytest
permissions:
contents: read
on:
push:
pull_request:
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{matrix.python-version}} at ${{matrix.os}}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
mkdir -p log/
- name: Test with pytest
run: |
pytest -c 'test/pytest.ini'
- name: Save artifacts
uses: actions/upload-artifact@v4
with:
name: test-${{ matrix.python-version }}.log
path: log/test.log