Add monthly cron run to cover age/minisign updates. #68
This file contains 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: Tests | |
on: | |
push: | |
branches: [ main ] | |
paths-ignore: | |
- 'LICENSE.*' | |
- 'README.*' | |
- '.github/ISSUE-TEMPLATE/**' | |
- 'docs/**' | |
- '.hgignore' | |
- '.gitignore' | |
pull_request: | |
branches: [ main ] | |
paths-ignore: | |
- 'LICENSE.*' | |
- 'README.*' | |
- '.github/ISSUE-TEMPLATE/**' | |
- 'docs/**' | |
- '.hgignore' | |
- '.gitignore' | |
schedule: # at 03:06 on day-of-month 6 | |
- cron: '6 3 6 * *' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', 'pypy-3.9'] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Add Homebrew to PATH (Ubuntu) | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
run: | | |
echo "/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin" >> $GITHUB_PATH | |
- name: Set up age and minisign (POSIX) | |
if: ${{ matrix.os != 'windows-latest' }} | |
run: | | |
brew install age minisign | |
- name: Set up age and minisign (Windows) | |
if: ${{ matrix.os == 'windows-latest' }} | |
run: | | |
choco install age.portable | |
choco install minisign | |
- name: Test with unittest | |
run: | | |
age --version | |
minisign -v | |
python test_pagesign.py | |
- name: Test with coverage | |
run: | | |
pip install coverage | |
coverage run --branch test_pagesign.py | |
coverage xml | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
flags: unittests | |
files: coverage.xml | |
fail_ci_if_error: true |