add pytest.yml

This commit is contained in:
long2ice
2020-05-19 17:45:41 +08:00
parent 55e78bdd2d
commit 6d92aec4b1
5 changed files with 169 additions and 4 deletions

23
.github/workflows/pytest.yml vendored Normal file
View File

@@ -0,0 +1,23 @@
name: pytest
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-dev.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
- name: Test with pytest
run: |
make test