Skip to content

Bump package versions to latest July #60

Bump package versions to latest July

Bump package versions to latest July #60

name: build
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
permissions:
contents: read
jobs:
build-test:
# Original source: https://github.com/marketplace/actions/install-poetry-action#testing
runs-on: ubuntu-latest
steps:
- name: Check out repo and setup Python
uses: actions/checkout@v3
- name: Set up python
id: setup-python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Load cached Poetry installation, if exists
id: cached-poetry
uses: actions/cache@v3
with:
path: ~/.local # the path depends on the OS
key: poetry-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-4 # increment to reset cache, e.g. if you see .venv/bin/activate: No such file or directory
- name: Install and configure Poetry, if cache miss
if: steps.cached-poetry.outputs.cache-hit != 'true'
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Load cached venv, if exists
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}-1
- name: Install dependencies (without root project), if cache miss
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
- name: Install root project
run: poetry install --no-interaction
- name: Run style check - black
run: |
source .venv/bin/activate
black llmgraph tests --check --verbose
- name: Run linter - ruff
run: |
source .venv/bin/activate
ruff check . --verbose
- name: Run tests
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: |
source .venv/bin/activate
coverage run -m pytest -vvv -s ./tests
coverage report