From 62f8a498dd005baa892d7ceb1b35365ee75da064 Mon Sep 17 00:00:00 2001 From: Maximilian Schmidt Date: Thu, 25 Mar 2021 13:29:03 +0900 Subject: [PATCH] Add tests.yaml for github actions --- .github/workflows/tests.yaml | 49 ++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/tests.yaml diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml new file mode 100644 index 00000000..e156dba2 --- /dev/null +++ b/.github/workflows/tests.yaml @@ -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 \ No newline at end of file