From c3c78f361c0015518d4d2b5b8689edd0c422c9fc 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 | 47 ++++++++++++++++++++++++++++++++++++ 1 file changed, 47 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..a992d8f7 --- /dev/null +++ b/.github/workflows/tests.yaml @@ -0,0 +1,47 @@ +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 + run: | + coveralls \ No newline at end of file