Merge pull request #86 from yt-project/dependabot/github_actions/dot-… #201
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: Build and Test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
workflow_dispatch: | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build: | |
name: '${{ matrix.tests-type }} tests: py${{ matrix.python-version }} on ${{ matrix.os }}' | |
strategy: | |
# run all tests even if e.g. image tests fail early | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
python-version: | |
- '3.9' | |
- '3.10' | |
- '3.11' | |
- '3.12' | |
# Test all on ubuntu, test ends on macos and windows | |
include: | |
- os: macos-latest | |
python-version: '3.9' | |
- os: windows-latest | |
python-version: '3.9' | |
- os: macos-latest | |
python-version: '3.12' | |
- os: windows-latest | |
python-version: '3.12' | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Build | |
shell: bash | |
env: | |
dependencies: ${{ matrix.dependencies }} | |
run: | | |
python -m pip install -r test_requirements.txt | |
python -m pip install --editable "." | |
- name: Run Tests | |
env: | |
testsuite: ${{ matrix.tests-type }} | |
run: | | |
python -m pip list | |
pytest --color=yes |