Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
118 changes: 118 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
name: Test

on:
- push
- pull_request

jobs:

# Test different python versions with bash on Ubuntu.
ubuntu:
name: Test Ubuntu
runs-on: ubuntu-latest
if: ${{ !startsWith(github.ref, 'refs/tags') }}

strategy:
fail-fast: false
matrix:
python-version:
- 3.8
- 3.9
- "3.10"
- "3.11"

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: python -m pip install tox

- name: Run tests
run: tox -e py

# Test the latest python version with zsh on macOS
zsh:
name: Test Zsh
runs-on: macos-latest
if: ${{ !startsWith(github.ref, 'refs/tags') }}

strategy:
fail-fast: false

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4

- name: Install dependencies
run: python -m pip install tox

- name: Run tests
run: tox -e zsh

# Test different python versions with bash on macOS
macos:
name: Test macOS
runs-on: macos-latest
if: ${{ !startsWith(github.ref, 'refs/tags') }}

strategy:
fail-fast: false
matrix:
python-version:
- 3.8
- 3.9
- "3.10"
- "3.11"

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: python -m pip install tox

- name: Run tests
run: tox -e py

# Run various style checkers
style:
runs-on: ubuntu-latest
if: ${{ !startsWith(github.ref, 'refs/tags') }}

strategy:
fail-fast: false
tox-environment:
- docs
- style
- pkglint

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4

- name: Install dependencies
run: python -m pip install tox

- name: Run
run: tox -e ${{ matrix.tox-environment }}