Skip to content

Commit

Permalink
Create pytest.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
wwzeng1 authored Oct 22, 2023
1 parent 22b8aea commit 759168c
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 759168c

Please sign in to comment.