Skip to content

Commit

Permalink
Add tests.yaml for github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
mschmidt87 committed Mar 25, 2021
1 parent 9e4689b commit 62f8a49
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: run tests
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
hal-cgp-testsuite:
name: hal-cgp testsuite
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
dep: ['[all]', '[dev]']
exclude:
- python-version: 3.6
dep: "[dev]"
- python-version: 3.7
dep: "[dev]"
steps:
- name: checkout
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
env:
DEP: ${{ matrix.dep }}
run: |
python3 -m pip install --upgrade pip
pip install -e .$DEP
pip install pytest-cov coveralls
- name: Code checks
run: |
black --check .
flake8 --config=.flake8 .
mypy cgp
isort --check-only cgp examples test
- name: run tests
run: |
pytest --cov=cgp
- name: coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
coveralls

0 comments on commit 62f8a49

Please sign in to comment.