Skip to content

Commit

Permalink
Create test.yml
Browse files Browse the repository at this point in the history
From Epitools
  • Loading branch information
Pablo1990 authored Feb 13, 2024
1 parent a5e27f4 commit 7b15c2e
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Tests

on:
push:
branches:
- main
pull_request:

jobs:
test:
name: ${{ matrix.os }} py${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.9", "3.10"]
os: [ubuntu-latest]
include:
- os: macos-latest
python-version: "3.10"
- os: windows-latest
python-version: "3.10"
steps:
- name: Checkout source
uses: actions/checkout@v3

- name: Cache tox
uses: actions/cache@v3
with:
path: .tox
key: test-${{ hashFiles('pyproject.toml') }}

- name: Set up python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: "pyproject.toml"

# these libraries enable testing on Qt on linux
- uses: tlambert03/[email protected]

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

# this runs the platform-specific tests declared in tox.ini
- name: Test with tox
uses: aganders3/headless-gui@v1
with:
run: python -m tox -v
env:
PLATFORM: ${{ matrix.os }}

- name: Coverage
uses: coverallsapp/github-action@v2
with:
file: coverage.lcov

0 comments on commit 7b15c2e

Please sign in to comment.