Set up automated testing of projects #14
Workflow file for this run
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: tests | |
# Run on pushes and PRs; ignore updates to docs only | |
on: | |
push: | |
paths-ignore: ["*.md"] | |
branches: [main] | |
pull_request: | |
paths-ignore: ["*.md"] | |
branches: ["*"] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- run: pip install black | |
- run: python -m black --check . | |
test: | |
needs: lint | |
strategy: | |
matrix: | |
include: | |
- os: windows-latest | |
python_version: "3.10" | |
- os: macos-latest | |
python_version: "3.10" | |
- os: ubuntu-latest | |
python_version: "3.10" | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python_version }} | |
cache: "pip" | |
- run: pip install -r requirements.txt | |
- run: bash run-tests.sh |