Set up automated testing of projects #5
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: ["*"] | |
# Make sure we're exiting training as early as possible | |
env: | |
SPACY_CONFIG_OVERRIDES: "--training.max_epochs=1 --training.max_steps=1 --pretraining.max_epochs=1" | |
WEASEL_CONFIG_OVERRIDES: "--training.max_epochs=1 --training.max_steps=1 --pretraining.max_epochs=1" | |
WASABI_LOG_FRIENDLY: 1 | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v4 | |
- run: pip install black | |
- run: python -m black --check . | |
test: | |
needs: lint | |
strategy: | |
fail-fast: false | |
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@v2 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python_version }} | |
cache: "pip" | |
- run: pip install -r requirements.txt | |
- run: python -m unittest |