Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"waitFor": "onCreateCommand",
"updateContentCommand": "npm install",
"postCreateCommand": "",
"postCreateCommand": "npm install -g @google/gemini-cli@latest",
"postAttachCommand": {
"server": "npm start"
},
Expand Down
8 changes: 8 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
cd /path/to/your/local/clone
git checkout -b feat/testcontainers-cloud-check
git apply /path/to/changes.patch # apply the patches you want (outer/inner)
git add -A
git commit -m "Make Testcontainers cloud assertion opt-in via env var; add PR trigger workflow"
git push --set-upstream origin feat/testcontainers-cloud-check
cd /workspaces/codespaces-react
git diff > /tmp/my-local-changes.patch
node_modules
dist
.vite
Expand Down
11 changes: 11 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = {
extends: [
'react-app',
'react-app/jest',
'plugin:prettier/recommended',
],
plugins: ['prettier'],
rules: {
'prettier/prettier': 'error',
},
};
10 changes: 8 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: CI

on:
push:
branches: [ main, master ]
branches: [ main, Dreadwitdastacc-Ifawole, feat/testcontainers-cloud-check ]
pull_request:
branches: [ main, master ]
branches: [ main, Dreadwitdastacc-Ifawole ]

jobs:
test:
Expand All @@ -17,5 +17,11 @@ jobs:
node-version: '18'
- name: Install
run: npm ci
- name: Lint code
run: npm run lint:check
- name: Check formatting
run: npm run format:check
- name: Run tests
run: npx vitest run --reporter dot
- name: Build
run: npm run build
18 changes: 18 additions & 0 deletions .github/workflows/track_pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
on:
workflow_dispatch:
pull_request:
jobs:
track_pr:
runs-on: ubuntu-latest
steps:
- name: Generate token
id: generate-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.APP_PEM }}
- name: Use API
env:
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
run: |
gh api https://api.github.com/repos/octocat/Spoon-Knife/issues
2 changes: 2 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
npm run lint
npm run format
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
//npm.pkg.github.com/:_authToken=TOKEN
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"semi": true,
"trailingComma": "es5",
"singleQuote": true,
"printWidth": 80,
"tabWidth": 2,
"useTabs": false
}
22 changes: 22 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"type": "shell",
"command": "npm",
"args": ["run", "build"],
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"echo": true,
"reveal": "silent",
"focus": false,
"panel": "shared"
},
"problemMatcher": "$tsc"
}
]
}
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ ENV NJS_RELEASE 1~trixie
ENV PKG_RELEASE 1~trixie
ENV DYNPKG_RELEASE 1~trixie

# Install dependencies
RUN npm install --legacy-peer-deps
RUN set -x \
# create nginx user/group first, to be consistent throughout docker variants
&& groupadd --system --gid 101 nginx \
Expand Down Expand Up @@ -138,6 +140,19 @@ COPY 20-envsubst-on-templates.sh /docker-entrypoint.d
COPY 30-tune-worker-processes.sh /docker-entrypoint.d
ENTRYPOINT ["/docker-entrypoint.sh"]

# Build the application
RUN npm run build

# Production stage
FROM nginx:alpine

# Copy built files from builder stage
COPY --from=builder /app/dist /usr/share/nginx/html

# Copy custom nginx configuration
COPY nginx.conf /etc/nginx/nginx.conf

# Expose port 80
EXPOSE 80

STOPSIGNAL SIGQUIT
Expand Down
6 changes: 4 additions & 2 deletions Dockerfile.backend
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ RUN npm ci --only=production

# Copy source code
COPY openai.js ./
COPY .env ./

# Copy .env if it exists (optional)
COPY .env* ./

# Expose port
EXPOSE 3001

# Start the server
CMD ["node", "openai.js"]
CMD ["node", "openai.js"]
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,16 @@ This project is licensed under the MIT License.

In the project directory, you can run:

## Gemini CLI

Gemini 3 Pro and Gemini 3 Flash are available via the Gemini CLI. The Codespace includes the Gemini CLI; to ensure you have the latest version, run:

```bash
npm install -g @google/gemini-cli@latest
```

After installing, use the Gemini CLI to list available models and invoke the CLI tools. This project is configured to work with Gemini 3 Pro and Gemini 3 Flash where applicable.

### `npm start`

We've already run this for you in the `Codespaces: server` terminal window below. If you need to stop the server for any reason you can just run `npm start` again to bring it back online.
Expand Down
Binary file added branch-artifact.tar.gz
Binary file not shown.
37 changes: 37 additions & 0 deletions branch-artifact/.github/agents/my-agent.agent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
# Fill in the fields below to create a basic custom agent for your repository.
# The Copilot CLI can be used for local testing: https://gh.io/customagents/cli
# To make this agent available, merge this file into the default repository branch.
# For format details, see: https://gh.io/customagents/config

name:
description:
---

# My Agent

Describe what your agent does here...Code guidelines:
- Use {language} conventions
- Follow {pattern/code_guidelines}
- Optimize for {goal}
English repeated attempts prosperity
Communication:
- Write in {tone/language}
- Reference {source_type} documentation
- Structure responses as {format}

Code guidelines:
- Use {language} conventions
- Follow {pattern/code_guidelines}
- Optimize for {goal}


Your role:
- {role_type} expert in {domain}
- Focus on {key_skill_area}

Code guidelines:
- Use {language} conventions
- creatively self aweare and enhanced
- {role_type} expert in {domain}
- Focus on {key_skill_area}
11 changes: 11 additions & 0 deletions branch-artifact/.github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"copilotInstructions": "Refer to .copilot-codeGeneration-instructions.md at the repo root for all Copilot Chat and code-generation hints."
}

```jsonc
"github.copilot.chat.codeGeneration.instructions": [
{ "file": ".copilot-codeGeneration-instructions.md" }
]
```

Keep instructions concise, specific, and actionable.
38 changes: 38 additions & 0 deletions branch-artifact/.github/workflows/datadog-synthetics.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# This workflow will trigger Datadog Synthetic tests within your Datadog organisation
# For more information on running Synthetic tests within your GitHub workflows see: https://docs.datadoghq.com/synthetics/cicd_integrations/github_actions/

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

# To get started:

# 1. Add your Datadog API (DD_API_KEY) and Application Key (DD_APP_KEY) as secrets to your GitHub repository. For more information, see: https://docs.datadoghq.com/account_management/api-app-keys/.
# 2. Start using the action within your workflow

name: Run Datadog Synthetic tests

on:
push:
branches: [ "Dreadwitdastacc-Ifawole" ]
pull_request:
branches: [ "Dreadwitdastacc-Ifawole" ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

# Run Synthetic tests within your GitHub workflow.
# For additional configuration options visit the action within the marketplace: https://github.com/marketplace/actions/datadog-synthetics-ci
- name: Run Datadog Synthetic tests
uses: DataDog/synthetics-ci-github-action@87b505388a22005bb8013481e3f73a367b9a53eb # v1.4.0
with:
api_key: ${{secrets.DD_API_KEY}}
app_key: ${{secrets.DD_APP_KEY}}
test_search_query: 'tag:e2e-tests' #Modify this tag to suit your tagging strategy


67 changes: 67 additions & 0 deletions branch-artifact/.github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Docker Build and Push

on:
push:
branches:
- main
- copilot/**
tags:
- 'v*'
pull_request:
branches:
- main
workflow_dispatch:

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

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

- name: Log in to Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels)
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha,prefix={{branch}}-
type=raw,value=latest,enable={{is_default_branch}}

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/amd64,linux/arm64

- name: Image digest
run: echo ${{ steps.meta.outputs.tags }}
18 changes: 18 additions & 0 deletions branch-artifact/.github/workflows/track_pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
on:
workflow_dispatch:
pull_request:
jobs:
track_pr:
runs-on: ubuntu-latest
steps:
- name: Generate token
id: generate-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.APP_PEM }}
- name: Use API
env:
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
run: |
gh api https://api.github.com/repos/octocat/Spoon-Knife/issues
8 changes: 8 additions & 0 deletions branch-artifact/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Apply these changes in your local clone:
1. Download branch-artifact.tar.gz and extract
2. From your repo root: git checkout -b feat/testcontainers-cloud-check
3. cp -r branch-artifact/.github .
4. cp branch-artifact/package.json .
5. cp branch-artifact/inner_example_changes.patch .
6. git apply inner_example_changes.patch || true
7. git add -A && git commit -m 'Make Testcontainers cloud assertion opt-in via env var; add PR trigger workflow'
6 changes: 6 additions & 0 deletions branch-artifact/changes.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
diff --git a/testcontainers-cloud-java-example b/testcontainers-cloud-java-example
--- a/testcontainers-cloud-java-example
+++ b/testcontainers-cloud-java-example
@@ -1 +1 @@
-Subproject commit 8791749be62b251f06f9feaa9eb1121b9783074c
+Subproject commit 8791749be62b251f06f9feaa9eb1121b9783074c-dirty
Loading
Loading