Skip to content

Cleanup Windows Action #1

Cleanup Windows Action

Cleanup Windows Action #1

Workflow file for this run

name: Run unit tests
on:
pull_request:
branches:
- main
- current-release
- "*LTS"
types: [opened, synchronize, reopened, ready_for_review]
jobs:
run_linux_unit_tests:
name: "Linux - ${{ matrix.config.tox-env }}"
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
config:
- { python-version: "3.8", tox-env: py38 }
- { python-version: "3.8", tox-env: py38-no-ext }
- { python-version: "3.9", tox-env: py39 }
- { python-version: "3.9", tox-env: py39-no-ext }
- { python-version: "3.10", tox-env: py310 }
- { python-version: "3.10", tox-env: py310-no-ext }
- { python-version: "3.11", tox-env: py311 }
- { python-version: "3.11", tox-env: py311-no-ext }
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Python ${{ matrix.config.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.config.python-version }}
- name: Install tox
run: pip install tox
- name: Run unit tests
uses: nick-fields/retry@v2
with:
timeout_minutes: 10
max_attempts: 3
command: tox -e ${{ matrix.config.tox-env }}
run_windows_unit_tests:
name: "Windows - ${{ matrix.config.tox-env }}"
if: github.event.pull_request.draft == false
runs-on: windows-latest
strategy:
fail-fast: true
matrix:
config:
- { python-version: "3.8", tox-env: py38-no-ext }
- { python-version: "3.9", tox-env: py39-no-ext }
- { python-version: "3.10", tox-env: py310-no-ext }
- { python-version: "3.11", tox-env: py310-no-ext }
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Python ${{ matrix.config.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.config.python-version }}
- name: Install tox
run: pip install tox
- name: Run unit tests
run: |
tox -e ${{ matrix.config.tox-env }}

Check failure on line 75 in .github/workflows/pr-unit-tests.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/pr-unit-tests.yml

Invalid workflow file

You have an error in your yaml syntax on line 75
if ($LASTEXITCODE -ne 0) {
# Command exit code is not zero
Write-Host "::warning::Unit tests failed, but exiting with success code"
exit 0
}