Training unittests and lint check

This commit is contained in:
Reuben Morais 2021-05-19 11:44:41 +02:00
parent 3f17bba229
commit f9ecf8370e
2 changed files with 44 additions and 0 deletions

32
.github/workflows/lint.yml vendored Normal file
View File

@ -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

12
ci_scripts/train-unittests.sh Executable file
View File

@ -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