diff --git a/.github/workflows/run_test.yml b/.github/workflows/run_test.yml new file mode 100644 index 0000000..2a65cb9 --- /dev/null +++ b/.github/workflows/run_test.yml @@ -0,0 +1,36 @@ +name: Run All UnitTest + +on: [push, pull_request] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + max-parallel: 4 + matrix: + python-version: [3.7, 3.8] + + steps: + - uses: actions/checkout@v1 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + - uses: actions/cache@v1 + with: + path: ~/.cache/pip + key: > + ${{ runner.os }}-pip- + ${{ hashFiles('**/requirements.txt') }}- + ${{ hashFiles('**/requirements-test.txt') }} + restore-keys: | + ${{ runner.os }}-pip- + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt -r requirements-test.txt + - name: Test with pytest + run: | + export PYTHONPATH=./ + pytest --verbose --color=yes \ No newline at end of file