diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000..f230e3c7 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,32 @@ +name: "Lints" +on: + pull_request: +defaults: + run: + shell: bash +jobs: + training-unittests: + name: "Lin|Training unittests" + runs-on: ubuntu-20.04 + strategy: + matrix: + pyver: [3.6, 3.7] + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.pyver }} + - name: Run training unittests + run: | + ./ci_scripts/train-unittests.sh + pre-commit-checks: + name: "Lin|Pre-commit checks" + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: 3.8 + - name: Run pre-comit checks + run: | + python .pre-commit-2.11.1.pyz run --all-files diff --git a/ci_scripts/train-unittests.sh b/ci_scripts/train-unittests.sh new file mode 100755 index 00000000..bd74c15c --- /dev/null +++ b/ci_scripts/train-unittests.sh @@ -0,0 +1,12 @@ +#!/bin/bash +set -xe + +source $(dirname "$0")/all-vars.sh +source $(dirname "$0")/all-utils.sh + +set -o pipefail +pip install --upgrade pip setuptools wheel | cat +pip install --upgrade . | cat +set +o pipefail + +python -m unittest