feat: connect goob-ai to openai api w/ langchain #35
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SOURCE: https://github.com/openai/openai-python/blob/aed1e43745cd6358b4bafd3a39b3dfeee5e31a03/.github/workflows/ci.yml | |
name: CI | |
# SOURCE: https://github.com/tornadoweb/tornado/blob/f399f40fde0ae1b130646db783a6f79cc59231b2/.github/workflows/build.yml#L37 | |
on: | |
# https://docs.github.com/en/webhooks-and-events/webhooks/webhook-events-and-payloads#push | |
push: | |
branches: | |
# Run on release branches. This gives us a chance to detect rot in this | |
# configuration before pushing a tag (which we'd rather not have to undo). | |
- main | |
- feature/** | |
- '[0-9].*.x' # e.g., 4.14.x | |
- '[0-9][0-9].*.x' # e.g., 23.3.x | |
tags: | |
# The main purpose of this workflow is to build wheels for release tags. | |
# It runs automatically on tags matching this pattern and pushes to pypi. | |
- "v*" | |
# https://docs.github.com/en/webhooks-and-events/webhooks/webhook-events-and-payloads#pull_request | |
pull_request: | |
# https://docs.github.com/en/webhooks-and-events/webhooks/webhook-events-and-payloads#workflow_dispatch | |
workflow_dispatch: | |
# Allow this workflow to be run manually (pushing to testpypi instead of pypi) | |
env: | |
python-version: '3.10' | |
jobs: | |
test: | |
name: test | |
runs-on: ubuntu-22.04 | |
if: github.repository == 'bossjones/goob_ai' | |
env: | |
OS: ubuntu-22.04 | |
PYTHON: '3.10' | |
steps: | |
- name: Set up Git repository | |
uses: actions/checkout@v4 | |
- name: get version python | |
shell: bash # use bash to run date command | |
run: echo "Py${{ env.python-version }}" | |
- name: Hash + Timestamp | |
shell: bash # use bash to run date command | |
run: 'echo "HASH=${{ runner.os }}-${{ runner.arch }}-Py${{ env.python-version }}-$(date -u "+%Y%m")" >> $GITHUB_ENV' | |
- name: "Set up Python ${{ env.python-version }}" | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "${{ env.python-version }}" | |
- name: Install Rye | |
run: | | |
curl -sSf https://rye-up.com/get | bash | |
echo "$HOME/.rye/shims" >> $GITHUB_PATH | |
env: | |
RYE_VERSION: '0.33.0' | |
RYE_INSTALL_OPTION: '--yes' | |
- name: Run tests and collect coverage | |
run: | | |
cp -f env.sample .env | |
rye config --set-bool behavior.use-uv=true | |
./scripts/retry -t 4 -- rye sync --all-features | |
rye run lint | |
# rye run typecheck | |
rye run python -c 'import goob_ai' | |
rye run test | |
sudo apt update | |
sudo apt-get install tree -y | |
tree | |
ls -lta | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
# token: ${{ secrets.CODECOV_TOKEN }} | |
flags: "${{ runner.os }},${{ runner.arch }},${{ env.python-version }}" | |
verbose: true | |
fail_ci_if_error: true | |
# directory: ./junit/ | |
# files: ./test-results.xml,cov.xml | |
files: ./cov.xml | |
# flags: smart-tests | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
- name: Upload Test Results | |
if: '!cancelled()' | |
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 | |
with: | |
name: test-results-${{ env.HASH }} | |
path: | | |
.coverage | |
tools\durations\${{ runner.os }}.json | |
junit/test-results.xml | |
cov.xml | |
retention-days: 1 # temporary, combined in aggregate below |