-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GitHub Actions integration for tests
This patch removes the old, non-functional Travis CI integration and replaces it with GitHub Actions workflows.
- Loading branch information
Showing
5 changed files
with
60 additions
and
30 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,22 @@ | ||
name: lint | ||
|
||
on: | ||
- push | ||
- pull_request | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: set up python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.12' | ||
|
||
- name: install Python dependencies | ||
run: pip install bandit flake8 pyright | ||
|
||
- name: run flake8 | ||
run: flake8 --show-source watson/ tests/ scripts/ |
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 @@ | ||
name: test | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- 'dependabot/**' | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
# https://endoflife.date/python | ||
# https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md#python | ||
python-version: | ||
- '3.8' | ||
- '3.9' | ||
- '3.10' | ||
- '3.11' | ||
- '3.12' | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: set up python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: install python dependencies | ||
run: pip install -r requirements.txt | ||
|
||
- name: install python test dependencies | ||
run: pip install -r requirements-dev.txt | ||
|
||
- name: run tests | ||
run: py.test -vs tests/ |
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 |
---|---|---|
@@ -1,18 +1,6 @@ | ||
-r requirements.txt | ||
|
||
# Docs | ||
mkdocs | ||
mkdocs-bootswatch | ||
|
||
# Release | ||
wheel | ||
twine | ||
|
||
# Tests | ||
flake8 | ||
py | ||
pytest | ||
pytest-datafiles | ||
pytest-mock | ||
pytest-runner | ||
tox |
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