Skip to content

Added _get_cronjob_data function #147

Added _get_cronjob_data function

Added _get_cronjob_data function #147

Workflow file for this run

name: Run tests
on: [push]
jobs:
tests:
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-latest]
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
exclude:
# Python 3.6 is not available in GitHub Actions Ubuntu 22.04
- os: ubuntu-latest
python-version: '3.6'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
# See https://github.com/yaml/pyyaml/issues/601
- name: Add cython constraint
run: 'echo "cython<3" > /tmp/constraint.txt'
- name: Install package
run: PIP_CONSTRAINT=/tmp/constraint.txt python -m pip install .[dev]
- name: Linting
# Python 3.12 bug breaks flake8: https://github.com/PyCQA/flake8/issues/1905
if: matrix.python-version != '3.12'
run: "flake8"
- name: Unit tests
run: "pytest --cov"
all-tests:
# Single step that will succeed iff all test steps succeed. To used for branch protection
runs-on: ubuntu-latest
needs: [tests]
if: always()
steps:
- name: Failed tests
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1
- name: Cancelled tests
if: ${{ contains(needs.*.result, 'cancelled') }}
run: exit 1
- name: Skipped tests
if: ${{ contains(needs.*.result, 'skipped') }}
run: exit 1
- name: Successful tests
if: ${{ !(contains(needs.*.result, 'failure')) && !(contains(needs.*.result, 'cancelled')) && !(contains(needs.*.result, 'skipped')) }}
run: exit 0