From 2dc287194e7d47d954f8725444628b79a55a40c5 Mon Sep 17 00:00:00 2001 From: Zach Burnett Date: Tue, 14 Mar 2023 16:34:56 -0400 Subject: [PATCH] move MacOS jobs to schedule --- .github/workflows/ci.yml | 7 +++++-- .github/workflows/ci_cron.yml | 38 +++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/ci_cron.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0c7c83fb..2af10b36 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,8 +30,11 @@ jobs: strategy: fail-fast: false matrix: - os: [ ubuntu-latest, macos-latest ] - python: [ "3.9", "3.10", "3.11" ] + os: [ ubuntu-latest ] + python: [ "3.7", "3.8", "3.9", "3.10", "3.11" ] + include: + - os: macos-latest + python: "3.11" steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 diff --git a/.github/workflows/ci_cron.yml b/.github/workflows/ci_cron.yml new file mode 100644 index 00000000..a947f5f6 --- /dev/null +++ b/.github/workflows/ci_cron.yml @@ -0,0 +1,38 @@ + +name: Weekly cron + +on: + schedule: + # Weekly Monday 6AM build + - cron: "0 0 * * 1" + workflow_dispatch: + +jobs: + test: + name: test (${{ matrix.os }}, Python ${{ matrix.python }}) + needs: [ style ] + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + include: + - os: macos-latest + python: "3.7" + - os: macos-latest + python: "3.8" + - os: macos-latest + python: "3.9" + - os: macos-latest + python: "3.10" + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python }} + - uses: actions/cache@v3 + with: + path: ${{ env.pythonLocation }} + key: test-${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('**/pyproject.toml', '**/setup.*') }} + - run: python -m pip install . pytest pytest-xdist + - run: pip freeze + - run: pytest -n auto