diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 06439e02ea9..8b3af8c0490 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,7 +1,9 @@ name: CI on: [push, pull_request] - +concurrency: + group: ci-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: test: name: Run Unit Tests diff --git a/.github/workflows/integration-test-agentics.yml b/.github/workflows/integration-test-agentics.yml new file mode 100644 index 00000000000..f8edbd29f63 --- /dev/null +++ b/.github/workflows/integration-test-agentics.yml @@ -0,0 +1,90 @@ +name: Integration Test Agentics + +on: + push: + branches: [main] + pull_request: + workflow_dispatch: + +permissions: + contents: read + +jobs: + integration-test-agentics: + name: Test Agentics Repository Integration + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version-file: go.mod + cache: true + + - name: Verify dependencies + run: go mod verify + + - name: Install development dependencies + run: make deps-dev + + - name: Build gh-aw binary + run: make build + + - name: Verify GitHub CLI is available + run: | + gh --version + echo "GitHub CLI is available" + + - name: Install gh-aw CLI extension locally + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + echo "Installing gh-aw extension locally..." + make install + + - name: Verify gh-aw extension installation + run: | + gh aw --help + gh aw version + + - name: Install workflows from agentics repository + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + echo "Installing workflows from githubnext/agentics..." + gh aw install githubnext/agentics + echo "Successfully installed agentics workflows" + + - name: List installed workflows + run: | + echo "Listing installed workflows..." + gh aw list + + - name: Recompile all workflows + run: | + echo "Recompiling all installed workflows..." + make recompile + echo "Successfully recompiled all workflows" + + - name: Check for compilation artifacts + run: | + echo "Checking for generated .lock.yml files..." + find .github/workflows -name "*.lock.yml" | head -10 || echo "No lock files found yet" + + - name: Verify no compilation errors + run: | + echo "Verifying workflow compilation completed without errors..." + if [ -n "$(find .github/workflows -name "*.md" -newer .github/workflows/*.lock.yml 2>/dev/null)" ]; then + echo "Warning: Some markdown files may be newer than their compiled versions" + fi + + - name: Display integration test summary + if: always() + run: | + echo "=== Integration Test Summary ===" + echo "Repository: githubnext/agentics" + echo "Workflows installed and compiled successfully" + echo "All validations passed" + ls -la .github/workflows/*.lock.yml 2>/dev/null || echo "Note: Check workflow compilation status above" \ No newline at end of file diff --git a/.github/workflows/test-claude.lock.yml b/.github/workflows/test-claude.lock.yml index 703abbee5ca..6564f00ada2 100644 --- a/.github/workflows/test-claude.lock.yml +++ b/.github/workflows/test-claude.lock.yml @@ -573,7 +573,7 @@ jobs: const parentIssueNumber = context.payload?.issue?.number; // Parse labels from environment variable (comma-separated string) const labelsEnv = process.env.GITHUB_AW_ISSUE_LABELS; - const labels = labelsEnv ? labelsEnv.split(',').map(label => label.trim()).filter(label => label) : []; + const labels = labelsEnv ? labelsEnv.split(',').map(/** @param {string} label */ label => label.trim()).filter(/** @param {string} label */ label => label) : []; // Parse the output to extract title and body const lines = outputContent.split('\n'); @@ -814,7 +814,9 @@ jobs: GITHUB_AW_PR_DRAFT: "true" with: script: | + /** @type {typeof import("fs")} */ const fs = require("fs"); + /** @type {typeof import("crypto")} */ const crypto = require("crypto"); const { execSync } = require("child_process"); @@ -898,7 +900,7 @@ jobs: // Parse labels from environment variable (comma-separated string) const labelsEnv = process.env.GITHUB_AW_PR_LABELS; - const labels = labelsEnv ? labelsEnv.split(',').map(label => label.trim()).filter(label => label) : []; + const labels = labelsEnv ? labelsEnv.split(',').map(/** @param {string} label */ label => label.trim()).filter(/** @param {string} label */ label => label) : []; // Parse draft setting from environment variable (defaults to true) const draftEnv = process.env.GITHUB_AW_PR_DRAFT; diff --git a/Makefile b/Makefile index 24075c62e6b..88b352bccb1 100644 --- a/Makefile +++ b/Makefile @@ -63,7 +63,7 @@ deps: .PHONY: deps-dev deps-dev: deps copy-copilot-to-claude go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest - npm install --package-lock-only + npm ci # Run linter .PHONY: golint diff --git a/pkg/workflow/js/create_issue.cjs b/pkg/workflow/js/create_issue.cjs index 0998f7fa13c..044c8484497 100644 --- a/pkg/workflow/js/create_issue.cjs +++ b/pkg/workflow/js/create_issue.cjs @@ -14,7 +14,7 @@ async function main() { const parentIssueNumber = context.payload?.issue?.number; // Parse labels from environment variable (comma-separated string) const labelsEnv = process.env.GITHUB_AW_ISSUE_LABELS; - const labels = labelsEnv ? labelsEnv.split(',').map(label => label.trim()).filter(label => label) : []; + const labels = labelsEnv ? labelsEnv.split(',').map(/** @param {string} label */ label => label.trim()).filter(/** @param {string} label */ label => label) : []; // Parse the output to extract title and body const lines = outputContent.split('\n'); diff --git a/pkg/workflow/js/create_pull_request.cjs b/pkg/workflow/js/create_pull_request.cjs index 656bad0cbfa..ea73782332a 100644 --- a/pkg/workflow/js/create_pull_request.cjs +++ b/pkg/workflow/js/create_pull_request.cjs @@ -1,4 +1,6 @@ +/** @type {typeof import("fs")} */ const fs = require("fs"); +/** @type {typeof import("crypto")} */ const crypto = require("crypto"); const { execSync } = require("child_process"); @@ -82,7 +84,7 @@ async function main() { // Parse labels from environment variable (comma-separated string) const labelsEnv = process.env.GITHUB_AW_PR_LABELS; - const labels = labelsEnv ? labelsEnv.split(',').map(label => label.trim()).filter(label => label) : []; + const labels = labelsEnv ? labelsEnv.split(',').map(/** @param {string} label */ label => label.trim()).filter(/** @param {string} label */ label => label) : []; // Parse draft setting from environment variable (defaults to true) const draftEnv = process.env.GITHUB_AW_PR_DRAFT;