Fix permissions #32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Python Multi-OS Tests | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
python-version: ["3.8", "3.9", "3.10", "3.11"] | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt || true # Ignore if no requirements.txt exists | |
- name: Run Tests | |
id: run_tests | |
run: | | |
python -m unittest discover -s tests | |
continue-on-error: false # Stop on failure | |
- name: Store Test Result in File | |
run: | | |
mkdir -p test-results | |
echo "${{ job.status }}" > test-results/test_result_${{ matrix.os }}_${{ matrix.python-version }}.txt | |
- name: Upload Unique Test Result Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: TEST_RESULT_${{ matrix.os }}_${{ matrix.python-version }} | |
path: test-results/ | |
retention-days: 1 |