Skip to content

Commit

Permalink
Fix for poetry install error
Browse files Browse the repository at this point in the history
Updated the github action to ensure poetry is installed initially
  • Loading branch information
Thomas-Rowlands authored Sep 29, 2024
1 parent f8646ce commit 7155fdf
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Test and build

on:
push:
branches: [main]
pull_request:
workflow_call:
workflow_dispatch:

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
python-version: ['3.12']
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

# Install Poetry
- name: Install Poetry
uses: abatilo/[email protected]
with:
poetry-version: 1.8.3

# Cache Poetry dependencies
- name: Cache Poetry Dependencies
uses: actions/cache@v3
with:
path: |
**/.venv
~/.cache/pypoetry
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
# Install dependencies using Poetry
- name: Install dependencies
run: poetry install

# Run tests using Poetry
- name: Run tests
run: poetry run pytest

0 comments on commit 7155fdf

Please sign in to comment.