diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml new file mode 100644 index 0000000..0ba31fa --- /dev/null +++ b/.github/workflows/pytest.yml @@ -0,0 +1,35 @@ +name: Pytest + +on: [push] + +jobs: + pytest: + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v2 + + - name: Set up Python 3.x + uses: actions/setup-python@v2 + with: + python-version: '3.x' + + # Caching Poetry dependencies + - name: Cache Poetry dependencies + uses: actions/cache@v2 + with: + path: ~/.cache/pypoetry + key: ${{ runner.os }}-poetry-${{ hashFiles('**/pyproject.toml') }} + restore-keys: | + ${{ runner.os }}-poetry- + + - name: Install Poetry + run: | + curl -sSL https://install.python-poetry.org | python3 - + + - name: Install Dependencies + run: | + poetry install + + - name: Run Pytest + run: poetry run pytest