diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..d3a2e7e --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,37 @@ +name: Tests +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + fail-fast: true + matrix: + os: [ubuntu-latest] + python-version: ['3.12'] + defaults: + run: + shell: bash + steps: + - name: Check out repository + uses: actions/checkout@v3 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Load cached venv + id: cached-pip-wheels + uses: actions/cache@v3 + with: + path: ~/.cache + key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -e . + + - name: Run pytest + run: pytest tests/*.py