Skip to content

Commit

Permalink
ci: Run tests daily (#1218)
Browse files Browse the repository at this point in the history
* ci: Run tests daily

* ci: Run tests on PRs and cron schedule

* ci: Fix formatting
  • Loading branch information
kesara authored Feb 3, 2025
1 parent 0595444 commit a46fad0
Showing 1 changed file with 34 additions and 32 deletions.
66 changes: 34 additions & 32 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: Tests + Code Analysis

on:
schedule:
- cron: '44 1 * * *'
push:
branches: [ main ]
pull_request:
Expand Down Expand Up @@ -48,7 +50,7 @@ jobs:
tests-linux:
name: Unit Tests (Linux)
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
if: ${{ github.event_name == 'pull_request' || github.event_name == 'schedule' }}

strategy:
matrix:
Expand Down Expand Up @@ -115,7 +117,7 @@ jobs:
tests-macos:
name: Unit Tests (macOS)
runs-on: macos-latest
if: github.event_name == 'pull_request'
if: ${{ github.event_name == 'pull_request' || github.event_name == 'schedule' }}

strategy:
matrix:
Expand Down Expand Up @@ -174,33 +176,33 @@ jobs:
env 'TOX_OVERRIDE=testenv.pass_env+=DYLD_FALLBACK_LIBRARY_PATH' tox
tests-windows:
name: Unit Tests (Windows)
runs-on: windows-latest
if: github.event_name == 'pull_request'

strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install Python dependencies
shell: pwsh
run: |
echo "C:\msys64\mingw64\bin" | Out-File -FilePath $env:GITHUB_PATH
echo "Installing pip + wheel..."
python -m pip install --upgrade pip wheel
echo "Installing test dependencies..."
python -m pip install . tox tox-gh-actions certifi decorator dict2xml pyflakes "pypdf>=4.10"
- name: Run pytests
env:
PLATFORM: windows-latest
run: tox -- pytests
name: Unit Tests (Windows)
runs-on: windows-latest
if: ${{ github.event_name == 'pull_request' || github.event_name == 'schedule' }}

strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install Python dependencies
shell: pwsh
run: |
echo "C:\msys64\mingw64\bin" | Out-File -FilePath $env:GITHUB_PATH
echo "Installing pip + wheel..."
python -m pip install --upgrade pip wheel
echo "Installing test dependencies..."
python -m pip install . tox tox-gh-actions certifi decorator dict2xml pyflakes "pypdf>=4.10"
- name: Run pytests
env:
PLATFORM: windows-latest
run: tox -- pytests

0 comments on commit a46fad0

Please sign in to comment.