Skip to content

Commit

Permalink
Merge branch 'dev' into d/1.0-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
creatorrr authored Sep 28, 2024
2 parents 6fd7d0c + be4d40f commit a3f593e
Show file tree
Hide file tree
Showing 28 changed files with 1,502 additions and 896 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/bake-push-to-hub.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build and push images to docker hub on merge to dev
run-name: ${{ github.actor }} is building and pushing images to docker hub

on:
push:
branches:
- "dev"
tags:
- "v*"

jobs:
Bake-Push-Images:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: julepai
password: "${{ secrets.DOCKER_HUB_PASSWORD }}"

- name: Build and push agent images
uses: docker/bake-action@v5
with:
files: |
./docker-bake.hcl
targets: agents-api
push: true
set: |
*.cache-from=type=gha
*.cache-to=type=gha,mode=max
env:
TAG: ${{ github.ref_name }}
GIT_SHA: ${{ github.sha }}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
23 changes: 13 additions & 10 deletions .github/workflows/changelog-ci.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
name: Changelog CI
name: Changelog on release

# TODO: This is currently not working. Need to fix it
on:
pull_request:
types: [ opened, synchronize ]
release:
types: [published]

jobs:
build:
changelog:
runs-on: ubuntu-latest

steps:
# Checks-out your repository
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: dev

- name: Run Changelog CI
uses: saadmk11/changelog-[email protected]
# Generate changelog from release notes
- uses: rhysd/changelog-from-release/action@v3
with:
changelog_filename: CHANGELOG.md
# config_file: changelog-ci-config.json
file: CHANGELOG.md
github_token: ${{ secrets.GITHUB_TOKEN }}
pull_request: true

39 changes: 39 additions & 0 deletions .github/workflows/docker-bake-on-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Bake images on PR
run-name: ${{ github.actor }} is baking images

on:
pull_request:

jobs:
Bake-Images:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: julepai
password: "${{ secrets.DOCKER_HUB_PASSWORD }}"

- name: Bake images
uses: docker/bake-action@v5
with:
files: |
./docker-bake.hcl
targets: agents-api
push: false
set: |
*.cache-from=type=gha
*.cache-to=type=gha,mode=max
env:
TAG: pr-run-${{ github.run_number }}-${{ github.run_attempt }}
GIT_SHA: ${{ github.sha }}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
97 changes: 0 additions & 97 deletions .github/workflows/generate-docs.yml

This file was deleted.

41 changes: 41 additions & 0 deletions .github/workflows/latest-push-to-hub.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Build and push images to docker hub on merge to main
run-name: ${{ github.actor }} is building and pushing images to docker hub

on:
push:
branches:
- "main"

jobs:
Bake-Push-Images:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: julepai
password: "${{ secrets.DOCKER_HUB_PASSWORD }}"

- name: Build and push agent images
uses: docker/bake-action@v5
with:
files: |
./docker-bake.hcl
targets: agents-api
push: true
set: |
*.cache-from=type=gha
*.cache-to=type=gha,mode=max
env:
TAG: latest
GIT_SHA: ${{ github.sha }}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
76 changes: 19 additions & 57 deletions .github/workflows/lint-and-format.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Lint and typecheck APIs and SDKs
name: Lint and typecheck agents-api
run-name: ${{ github.actor }} is linting and typechecking the code

# TODO: Fix CI github actions
Expand All @@ -10,99 +10,61 @@ jobs:
Lint-And-Format:
runs-on: ubuntu-latest

strategy:
matrix:
directory: [agents-api, sdks/python]

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.12"

- name: Install and configure Poetry
uses: snok/install-poetry@v1

- name: Configure Poetry to use .venv
run: |
cd ${{ matrix.directory }}
cd agents-api
poetry config virtualenvs.in-project true
- name: Cache Poetry virtualenv
uses: actions/cache@v4
with:
path: ${{ matrix.directory }}/.venv
key: ${{ runner.os }}-${{ matrix.directory }}-poetry-${{ hashFiles(format('{0}/poetry.lock', matrix.directory)) }}
path: agents-api/.venv
key: ${{ runner.os }}-agents-api-poetry-${{ hashFiles('agents-api/poetry.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.directory }}-poetry-
${{ runner.os }}-agents-api-poetry-
- name: Cache pytype
uses: actions/cache@v4
with:
path: ${{ matrix.directory }}/.pytype
key: ${{ runner.os }}-${{ matrix.directory }}-pytype-${{ hashFiles(format('{0}/**/*.py', matrix.directory)) }}
path: agents-api/.pytype
key: ${{ runner.os }}-agents-api-pytype-${{ hashFiles('agents-api/**/*.py') }}
restore-keys: |
${{ runner.os }}-${{ matrix.directory }}-pytype-
${{ runner.os }}-agents-api-pytype-
- name: Install dependencies
run: |
cd ${{ matrix.directory }}
cd agents-api
poetry install
- name: Lint and format
run: |
cd ${{ matrix.directory }}
poetry run poe format
poetry run poe lint
- name: Typecheck
run: |
cd ${{ matrix.directory }}
cd agents-api
poetry run poe typecheck
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "refactor: Lint ${{ matrix.directory }} (CI)"
branch: ${{ github.head_ref }}

Lint-And-Format-TS-SDK:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "20.x"

- name: Cache npm dependencies
uses: actions/cache@v4
with:
path: sdks/ts/node_modules
key: ${{ runner.os }}-sdks-ts-npm-${{ hashFiles('sdks/ts/package-lock.json') }}
restore-keys: |
${{ runner.os }}-sdks-ts-npm-
- name: Install npm dependencies
run: |
cd sdks/ts
npm ci
- name: Lint and format TypeScript SDK
- name: Lint and format
run: |
cd sdks/ts
npm run format
cd agents-api
poetry run poe format
poetry run poe lint
- name: Build TypeScript SDK
- name: Run tests
run: |
cd sdks/ts
npm run build
cd agents-api
poetry run poe test
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "refactor: Lint sdks/ts (CI)"
commit_message: "refactor: Lint agents-api (CI)"
branch: ${{ github.head_ref }}

concurrency:
Expand Down
Loading

0 comments on commit a3f593e

Please sign in to comment.