fixing github action

This commit is contained in:
João Moura
2024-01-10 12:24:37 -03:00
parent 786691e97e
commit feafa586ae
2 changed files with 3 additions and 32 deletions

View File

@@ -1,27 +0,0 @@
version: 2.1
jobs:
build-and-test:
docker:
- image: python:3.9.18
steps:
- checkout
- run:
name: Install poetry
command: pip install poetry
- run:
name: Install dependencies
command: poetry install
- run:
name: Update PATH and Define Environment Variable at Runtime
command: |
echo 'export OPENAI_API_KEY=fake-api-key' >> "$BASH_ENV"
source "$BASH_ENV"
- run:
name: Run tests
command: poetry run pytest
workflows:
build-and-test:
jobs:
- build-and-test

View File

@@ -5,6 +5,9 @@ on: push
permissions:
contents: write
env:
OPENAI_API_KEY: fake-api-key
jobs:
deploy:
runs-on: ubuntu-latest
@@ -25,10 +28,5 @@ jobs:
poetry lock &&
poetry install
- name: Set ENV vars
run: |
echo 'export OPENAI_API_KEY=fake-api-key' >> "$BASH_ENV" &&
source "$BASH_ENV"
- name: Run tests
run: poetry run pytest