Skip to content

Commit

Permalink
Merge pull request #130 from Sifchain/realitySpiral/gitTesting
Browse files Browse the repository at this point in the history
feat: add ideate action to make interaction on CLI with LLM more useful
  • Loading branch information
monilpat authored Dec 23, 2024
2 parents c1ff6ed + 7c2578b commit 53c3bd4
Show file tree
Hide file tree
Showing 976 changed files with 66,356 additions and 10,541 deletions.
280 changes: 170 additions & 110 deletions .env.example

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
cache: "pnpm"

- name: Install dependencies
run: pnpm install --frozen-lockfile
run: pnpm install

- name: Run Prettier
run: pnpm run prettier --check .
Expand Down
103 changes: 56 additions & 47 deletions .github/workflows/image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,53 +9,62 @@ on:

# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds.
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

# There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu.
jobs:
build-and-push-image:
runs-on: ubuntu-latest
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
permissions:
contents: read
packages: write
attestations: write
id-token: write
#
steps:
- name: Checkout repository
uses: actions/checkout@v4
# Uses the `docker/login-action` action to log in to the Container registry registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here.
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# This step uses [docker/metadata-action](https://github.com/docker/metadata-action#about) to extract tags and labels that will be applied to the specified image. The `id` "meta" allows the output of this step to be referenced in a subsequent step. The `images` value provides the base name for the tags and labels.
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
# This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages.
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository.
# It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step.
- name: Build and push Docker image
id: push
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

# This step generates an artifact attestation for the image, which is an unforgeable statement about where and how it was built. It increases supply chain security for people who consume the image. For more information, see "[AUTOTITLE](/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds)."
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true

build-and-push-image:
runs-on: ubuntu-latest
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
permissions:
contents: read
packages: write
attestations: write
id-token: write
#
steps:
- name: Checkout repository
uses: actions/checkout@v4
# Uses the `docker/login-action` action to log in to the Container registry registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here.
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# This step uses [docker/metadata-action](https://github.com/docker/metadata-action#about) to extract tags and labels that will be applied to the specified image. The `id` "meta" allows the output of this step to be referenced in a subsequent step. The `images` value provides the base name for the tags and labels.
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
# This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages.
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository.
# It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step.
- name: Build and push Docker image
id: push
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

# This step generates an artifact attestation for the image, which is an unforgeable statement about where and how it was built. It increases supply chain security for people who consume the image. For more information, see "[AUTOTITLE](/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds)."
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true

# This step makes the Docker image public, so users can pull it without authentication.
- name: Make Docker image public
run: |
curl \
-X PATCH \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/user/packages/container/${{ env.IMAGE_NAME }}/visibility \
-d '{"visibility":"public"}'
24 changes: 15 additions & 9 deletions .github/workflows/integrationTests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
push:
branches:
- "*"
pull_request_target:
pull_request:
branches:
- "*"
jobs:
Expand All @@ -25,6 +25,8 @@ jobs:
run: pnpm run smokeTests
integration-tests:
runs-on: ubuntu-latest
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
steps:
- uses: actions/checkout@v4

Expand All @@ -38,18 +40,22 @@ jobs:
cache: "pnpm"

- name: Install dependencies
run: pnpm install -r --frozen-lockfile
run: pnpm install -r

- name: Build packages
run: pnpm build

- name: Run integration tests
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
- name: Check for API key
id: check_api_key
run: |
if [ -z "$OPENAI_API_KEY" ]; then
echo "Skipping integration tests due to missing required API keys"
exit 1
else
pnpm run integrationTests
echo "Error: OPENAI_API_KEY is not set."
exit 1
fi
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}

- name: Run integration tests
run: pnpm run integrationTests
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: 22
node-version: 23.3.0

- uses: pnpm/action-setup@v3
with:
version: 8
version: 9.15.0

- name: Configure Git
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sync-upstream.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

- name: Add upstream remote
run: |
git remote add upstream https://github.com/ai16z/eliza.git
git remote add upstream https://github.com/elizaOS/eliza.git
git remote -v
- name: Fetch upstream
Expand Down
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ node_modules

.env
.env.production
.env.local
.env_main
concatenated-output.ts
embedding-cache.json
packages/plugin-buttplug/intiface-engine
Expand Down Expand Up @@ -50,4 +52,8 @@ tsup.config.bundled_*.mjs

.turbo

.repos
.repos
coverage
.eslintcache

agent/content
4 changes: 2 additions & 2 deletions .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ tasks:
- name: "init eliza env"
init: |
nvm install v23.3.0
git fetch --tags
git checkout $(git describe --tags --abbrev=0)
command: pnpm install && pnpm run build

command: pnpm install && pnpm run build
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@
"[shellscript]": {
"editor.defaultFormatter": "foxundermoon.shell-format"
}
}
}
Loading

0 comments on commit 53c3bd4

Please sign in to comment.