Merge pull request #60 from plone/pre-commit-ci-update-config #51
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: Windows and MacOS | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
build: | |
strategy: | |
# We want to see all failures: | |
fail-fast: false | |
matrix: | |
os: | |
- ["windows", "windows-latest"] | |
- ["macos", "macos-12"] | |
config: | |
# [Python version, tox env] | |
- ["3.9", "test"] | |
runs-on: ${{ matrix.os[1] }} | |
name: ${{ matrix.os[0] }}-${{ matrix.config[1] }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.config[0] }} | |
- name: Pip cache | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ matrix.config[0] }}-${{ hashFiles('setup.*', 'tox.ini') }} | |
restore-keys: | | |
${{ runner.os }}-pip-${{ matrix.config[0] }}- | |
${{ runner.os }}-pip- | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install tox | |
- name: Test | |
run: | | |
tox -e ${{ matrix.config[1] }} |