Skip to content

Commit 21b6a30

Browse files
committed
feat(ci): add CI workflow for Java with ByteBuddy agent integration
1 parent bb73a46 commit 21b6a30

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
paths:
6+
- '**/*.java'
7+
- 'pom.xml'
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
env:
13+
BYTEBUDDY_VERSION: 1.17.5
14+
15+
steps:
16+
- uses: actions/checkout@v3
17+
- uses: actions/cache@v3
18+
with:
19+
path: ~/.m2/repository
20+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
21+
restore-keys: |
22+
${{ runner.os }}-maven-
23+
24+
- name: Set up JDK 17
25+
uses: actions/setup-java@v3
26+
with:
27+
java-version: '17'
28+
distribution: 'temurin'
29+
30+
- name: Download ByteBuddy agent for tests
31+
run: mvn -B dependency:copy -Dartifact=net.bytebuddy:byte-buddy-agent:${{ env.BYTEBUDDY_VERSION }} -DoutputDirectory=target/test-agent -Dtransitive=false
32+
33+
- name: Run unit tests
34+
run: mvn -B -DargLine="-javaagent=${{ github.workspace }}/target/test-agent/byte-buddy-agent-${{ env.BYTEBUDDY_VERSION }}.jar" test

0 commit comments

Comments
 (0)