-
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.
Merge pull request #31 from henryborchers/github-actions
GitHub actions
- Loading branch information
Showing
2 changed files
with
39 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
on: [push, pull_request] | ||
name: Supported Python Compatibility Test | ||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-2019] | ||
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] | ||
include: | ||
- os: macos-latest | ||
- os: ubuntu-latest | ||
- os: windows-2019 | ||
fail-fast: false | ||
name: Python ${{ matrix.python-version }} ${{ matrix.os }} build | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: 'pip' # caching pip dependencies | ||
- name: Install requirements | ||
run: | | ||
pip install tox | ||
- uses: actions/github-script@v7 | ||
id: tox-env | ||
with: | ||
result-encoding: string | ||
script: | | ||
const frontend = "${{matrix.frontend}}" | ||
const toxEnv = "py${{matrix.python-version}}".replace('.','') | ||
if(frontend === ""){ | ||
return toxEnv | ||
} | ||
return "py${{matrix.python-version}}".replace('.','') + "-${{matrix.frontend}}" | ||
- name: Run tox | ||
run: tox -e ${{ steps.tox-env.outputs.result }} |
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