Skip to content

feat: add skill directories and disabled skills to session request an… #39

feat: add skill directories and disabled skills to session request an…

feat: add skill directories and disabled skills to session request an… #39

Workflow file for this run

name: "Build & Test"
env:
COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }}
on:
schedule:
# Run once a day at 00:00 UTC
- cron: '0 0 * * *'
push:
branches: [main]
pull_request:
workflow_dispatch:
merge_group:
permissions:
contents: read
jobs:
java-sdk:
name: "Java SDK Tests"
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 22
- uses: actions/setup-java@v5
with:
java-version: "17"
distribution: "temurin"
- name: Run spotless check
run: |
mvn spotless:check
if [ $? -ne 0 ]; then
echo "❌ spotless:check failed. Please run 'mvn spotless:apply' in java"
exit 1
fi
echo "✅ spotless:check passed"
- name: Build SDK and clone test harness
run: mvn compile
- name: Install Copilot CLI from cloned SDK
id: setup-copilot
run: |
# Install dependencies in the cloned SDK's nodejs directory
# This ensures we use the same CLI version as the test harness expects
npm --prefix target/copilot-sdk/nodejs ci --ignore-scripts
echo "path=$(pwd)/target/copilot-sdk/nodejs/node_modules/@github/copilot/index.js" >> $GITHUB_OUTPUT
- name: Verify CLI works
run: node ${{ steps.setup-copilot.outputs.path }} --version
- name: Run Java SDK tests
env:
# Set CI=false to bypass a JSON parsing bug in the upstream SDK test harness
# (replayingCapiProxy.ts:260-266 emitNoMatchingRequestWarning with empty body)
# This can be removed once the upstream issue is fixed.
CI: "false"
COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }}
COPILOT_CLI_PATH: ${{ steps.setup-copilot.outputs.path }}
run: mvn verify