Skip to content

Commit 43a42f6

Browse files
Add copilot-setup-steps.yml as GitHub Actions workflow for automated agent environment configuration (#382)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: thomasturrell <1552612+thomasturrell@users.noreply.github.com>
1 parent 9ffa222 commit 43a42f6

File tree

2 files changed

+44
-19
lines changed

2 files changed

+44
-19
lines changed

.github/copilot-instructions.md

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -22,25 +22,7 @@ xAPI Java is a library that helps you create applications that send or receive x
2222

2323
## Environment Setup
2424

25-
### Java Installation with SDKMAN
26-
27-
This project requires Java 25. We recommend using [SDKMAN!](https://sdkman.io/) to manage Java versions:
28-
29-
```bash
30-
# Install SDKMAN (if not already installed)
31-
curl -s "https://get.sdkman.io" | bash
32-
33-
# Install Java 25 (Temurin distribution recommended)
34-
sdk install java 25.0.1-tem
35-
36-
# Set as default (optional)
37-
sdk default java 25.0.1-tem
38-
39-
# Verify installation
40-
java -version
41-
```
42-
43-
**Note**: The exact identifier (e.g., `25.0.1-tem`) may vary by platform and availability. Use `sdk list java` to see available Java 25 versions for your system.
25+
**Note**: For GitHub Copilot agents, automated environment setup is configured in [copilot-setup-steps.yml](workflows/copilot-setup-steps.yml). The workflow automatically sets up Java 25 (Temurin distribution) and caches Maven dependencies.
4426

4527
## Building and Testing
4628

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# GitHub Copilot Setup Steps for xAPI Java
2+
# This workflow configures the environment for GitHub Copilot agents working on this repository.
3+
# See: https://docs.github.com/en/enterprise-cloud@latest/copilot/how-tos/use-copilot-agents/coding-agent/customize-the-agent-environment
4+
5+
name: "Copilot Setup Steps"
6+
7+
# Automatically run the setup steps when they are changed to allow for easy validation, and
8+
# allow manual testing through the repository's "Actions" tab
9+
on:
10+
workflow_dispatch:
11+
push:
12+
paths:
13+
- .github/workflows/copilot-setup-steps.yml
14+
pull_request:
15+
paths:
16+
- .github/workflows/copilot-setup-steps.yml
17+
18+
jobs:
19+
# The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.
20+
copilot-setup-steps:
21+
runs-on: ubuntu-latest
22+
23+
# Set the permissions to the lowest permissions possible needed for your steps.
24+
# Copilot will be given its own token for its operations.
25+
permissions:
26+
# Contents read permission is needed to clone the repository to install dependencies
27+
contents: read
28+
29+
# You can define any steps you want, and they will run before the agent starts.
30+
# If you do not check out your code, Copilot will do this for you.
31+
steps:
32+
- name: Checkout code
33+
uses: actions/checkout@v5
34+
35+
- name: Set up JDK 25
36+
uses: actions/setup-java@v5
37+
with:
38+
java-version: "25"
39+
distribution: "temurin"
40+
cache: maven
41+
42+
- name: Build with Maven
43+
run: ./mvnw -B clean verify -DskipTests --file pom.xml

0 commit comments

Comments
 (0)