Add pytest installation step #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .github/workflows/test.yml | |
name: PyTest | |
on: push | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v2 | |
# Setup Python (faster than using Python container) | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.11" | |
- name: Install pipenv | |
run: | | |
python -m pip install --upgrade pipenv wheel | |
- name: Cache pipenv | |
uses: actions/cache@v1 | |
id: cache-pipenv | |
with: | |
path: ~/.local/share/virtualenvs | |
key: ${{ runner.os }}-pipenv-${{ hashFiles('**/Pipfile.lock') }} | |
- name: Install dependencies | |
if: steps.cache-pipenv.outputs.cache-hit != 'true' | |
run: pipenv install --dev | |
- name: Install pytest | |
run: pip install pytest | |
- name: Run PyTest | |
run: pytest | |
working-directory: src |