Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 19, 2025

Description

Modifies the Copilot setup workflow to use mvn install instead of mvn verify and skip Checkstyle validation during environment preparation.

Changes

  • Updated .github/workflows/copilot-setup-steps.yml:
    • Changed Maven goal from verify to install to populate local repository with built artifacts
    • Added -Dcheckstyle.skip=true flag to skip style validation during setup
    • Added inline comments explaining the rationale

This speeds up Copilot agent environment initialization while maintaining Checkstyle enforcement in full CI/CD pipelines.

Resolves N/A (configuration improvement)

Checklist:

  • Public methods are documented
  • Public methods are tested
  • New and existing tests pass when run locally
  • There are no new warnings or errors
Original prompt

Modify the Copilot setup workflow file to install dependencies and skip Checkstyle during Copilot setup runs.

File to change:
.github/workflows/copilot-setup-steps.yml

Current line in file:
run: ./mvnw -B clean verify -DskipTests --file pom.xml

Required change:
Replace the Build with Maven step run command with:
run: ./mvnw -B clean install -DskipTests -Dcheckstyle.skip=true --file pom.xml

Constraints:

  • Only update the single workflow file .github/workflows/copilot-setup-steps.yml.
  • Keep the workflow header, name, triggers, job name, permissions, and other steps unchanged.
  • Commit message: "copilot-setup: use 'install' and skip Checkstyle during setup"
  • Branch name: copilot/setup-install-skip-checkstyle
  • PR title: "copilot-setup: use 'install' and skip Checkstyle during setup"
  • Include the full updated file content in the change.
  • Do not add assignees or reviewers.

Provide the PR after creating the branch and committing the change. Do not modify any other files.

Exact updated file content to apply:

GitHub Copilot Setup Steps for xAPI Java

This workflow configures the environment for GitHub Copilot agents working on this repository.

See: https://docs.github.com/en/enterprise-cloud@latest/copilot/how-tos/use-copilot-agents/coding-agent/customize-the-agent-environment

name: "Copilot Setup Steps"

Automatically run the setup steps when they are changed to allow for easy validation, and

allow manual testing through the repository's "Actions" tab

on:
workflow_dispatch:
push:
paths:
- .github/workflows/copilot-setup-steps.yml
pull_request:
paths:
- .github/workflows/copilot-setup-steps.yml

jobs:

The job MUST be called copilot-setup-steps or it will not be picked up by Copilot.

copilot-setup-steps:
runs-on: ubuntu-latest

# Set the permissions to the lowest permissions possible needed for your steps.
# Copilot will be given its own token for its operations.
permissions:
  # Contents read permission is needed to clone the repository to install dependencies
  contents: read

# You can define any steps you want, and they will run before the agent starts.
# If you do not check out your code, Copilot will do this for you.
steps:
  - name: Checkout code
    uses: actions/checkout@v5

  - name: Set up JDK 25
    uses: actions/setup-java@v5
    with:
      java-version: "25"
      distribution: "temurin"
      cache: maven

  - name: Build with Maven
    # Use 'install' instead of 'verify' and skip Checkstyle during this setup run.
    # Checkstyle can be enforced in full CI or local runs; skipping it here speeds dependency installation.
    run: ./mvnw -B clean install -DskipTests -Dcheckstyle.skip=true --file pom.xml

This pull request was created as a result of the following prompt from Copilot chat.

Modify the Copilot setup workflow file to install dependencies and skip Checkstyle during Copilot setup runs.

File to change:
.github/workflows/copilot-setup-steps.yml

Current line in file:
run: ./mvnw -B clean verify -DskipTests --file pom.xml

Required change:
Replace the Build with Maven step run command with:
run: ./mvnw -B clean install -DskipTests -Dcheckstyle.skip=true --file pom.xml

Constraints:

  • Only update the single workflow file .github/workflows/copilot-setup-steps.yml.
  • Keep the workflow header, name, triggers, job name, permissions, and other steps unchanged.
  • Commit message: "copilot-setup: use 'install' and skip Checkstyle during setup"
  • Branch name: copilot/setup-install-skip-checkstyle
  • PR title: "copilot-setup: use 'install' and skip Checkstyle during setup"
  • Include the full updated file content in the change.
  • Do not add assignees or reviewers.

Provide the PR after creating the branch and committing the change. Do not modify any other files.

Exact updated file content to apply:

GitHub Copilot Setup Steps for xAPI Java

This workflow configures the environment for GitHub Copilot agents working on this repository.

See: https://docs.github.com/en/enterprise-cloud@latest/copilot/how-tos/use-copilot-agents/coding-agent/customize-the-agent-environment

name: "Copilot Setup Steps"

Automatically run the setup steps when they are changed to allow for easy validation, and

allow manual testing through the repository's "Actions" tab

on:
workflow_dispatch:
push:
paths:
- .github/workflows/copilot-setup-steps.yml
pull_request:
paths:
- .github/workflows/copilot-setup-steps.yml

jobs:

The job MUST be called copilot-setup-steps or it will not be picked up by Copilot.

copilot-setup-steps:
runs-on: ubuntu-latest

# Set the permissions to the lowest permissions possible needed for your steps.
# Copilot will be given its own token for its operations.
permissions:
  # Contents read permission is needed to clone the repository to install dependencies
  contents: read

# You can define any steps you want, and they will run before the agent starts.
# If you do not check out your code, Copilot will do this for you.
steps:
  - name: Checkout code
    uses: actions/checkout@v5

  - name: Set up JDK 25
    uses: actions/setup-java@v5
    with:
      java-version: "25"
      distribution: "temurin"
      cache: maven

  - name: Build with Maven
    # Use 'install' instead of 'verify' and skip Checkstyle during this setup run.
    # Checkstyle can be enforced in full CI or local runs; skipping it here speeds dependency installation.
    run: ./mvnw -B clean install -DskipTests -Dcheckstyle.skip=true --file pom.xml

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: thomasturrell <1552612+thomasturrell@users.noreply.github.com>
Copilot AI changed the title [WIP] Copilot setup: use 'install' and skip Checkstyle during setup copilot-setup: use 'install' and skip Checkstyle during setup Nov 19, 2025
Copilot AI requested a review from thomasturrell November 19, 2025 00:56
@thomasturrell
Copy link
Contributor

Duplicate of #390

@thomasturrell thomasturrell marked this as a duplicate of #390 Nov 19, 2025
@thomasturrell thomasturrell deleted the copilot/copilotsetup-install-skip-checkstyle-again branch December 9, 2025 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants