-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test Python 3.12 and limit windows and macos CI runtime. (#205)
* Test Python 3.12. Also limit the number of jobs that run on limited macOS and windows runners. * Fix job name. * Remove redundant minimal dependency test. Minimal was identical to newest. * Add pip cache to reduce run time. * Also test macos and windows on oldest. * Fix job name. --------- Co-authored-by: Corwin Kerr <[email protected]>
- Loading branch information
Showing
1 changed file
with
36 additions
and
15 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,41 +16,62 @@ concurrency: | |
cancel-in-progress: true | ||
jobs: | ||
test: | ||
name: test (${{ matrix.os }}, ${{ matrix.python }}, ${{ matrix.dependencies }}) | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
config: [ {python: '3.8', dependencies: 'newest'}, | ||
{python: '3.9', dependencies: 'newest'}, | ||
{python: '3.10', dependencies: 'newest'}, | ||
{python: '3.11', dependencies: 'newest'}, | ||
{python: '3.11', dependencies: 'minimal'}, | ||
{python: '3.8', dependencies: 'oldest'} ] | ||
os: [ubuntu-latest] | ||
python: ['3.8', '3.9', '3.10', '3.11', '3.12'] | ||
include: | ||
# Default to newest dependencies | ||
- dependencies: 'newest' | ||
# Test the oldest Python with the oldest supported dependencies. | ||
- python: '3.8' | ||
dependencies: 'oldest' | ||
# Test macOS and windows on oldest and latest versions. | ||
- os: 'macos-latest' | ||
python: '3.12' | ||
dependencies: 'newest' | ||
- os: 'windows-latest' | ||
python: '3.12' | ||
dependencies: 'newest' | ||
- os: 'windows-latest' | ||
python: '3.8' | ||
dependencies: 'oldest' | ||
- os: 'macos-latest' | ||
python: '3.8' | ||
dependencies: 'oldest' | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: "recursive" | ||
- name: Set up Python ${{ matrix.config.python }} | ||
- name: Set up Python ${{ matrix.python }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.config.python }} | ||
- name: Install newest dependencies | ||
python-version: ${{ matrix.python }} | ||
- name: Get pip cache dir | ||
id: pip-cache | ||
run: | | ||
pip install -r requirements/requirements-test.txt | ||
if: ${{ matrix.config.dependencies == 'newest' }} | ||
- name: Install minimal dependencies | ||
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT | ||
- uses: actions/[email protected] | ||
with: | ||
path: ${{ steps.pip-cache.outputs.dir }} | ||
key: dashboard-unit-test-${{ matrix.os }}-${{ matrix.python }}-${{ matrix.dependencies }}-pip-${{ hashFiles('requirements/requirements-test.txt', '.github/workflows/ci-oldest-reqs.txt') }} | ||
restore-keys: | | ||
dashboard-unit-test-${{ matrix.os }}-${{ matrix.python }}-${{ matrix.dependencies }}-pip- | ||
- name: Install newest dependencies | ||
run: | | ||
pip install -r requirements/requirements-test.txt | ||
if: ${{ matrix.config.dependencies == 'minimal' }} | ||
if: ${{ matrix.dependencies == 'newest' }} | ||
- name: Install oldest supported dependencies | ||
# To prevent Dependabot from updating the pinnings in this "oldest" | ||
# dependency list, we have to avoid the word "requirements" in the | ||
# filename. That's why it is in the .github/ directory and named "reqs" | ||
# instead of "requirements." | ||
run: | | ||
pip install -r .github/workflows/ci-oldest-reqs.txt | ||
if: ${{ matrix.config.dependencies == 'oldest' }} | ||
if: ${{ matrix.dependencies == 'oldest' }} | ||
- name: Install the package | ||
run: | | ||
pip install -e . | ||
|