Skip to content

Commit 6f21d2d

Browse files
Update ci.yml
1 parent 0a64628 commit 6f21d2d

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

.github/workflows/ci.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,30 +19,30 @@ jobs:
1919
uses: actions/checkout@v4
2020
with:
2121
fetch-depth: 0
22-
22+
2323
- name: Set up JDK 17
2424
uses: actions/setup-java@v4
2525
with:
2626
java-version: '17'
2727
distribution: 'temurin'
28-
28+
2929
- name: Cache Maven local repository
3030
uses: actions/cache@v4
3131
with:
3232
path: ~/.m2/repository
3333
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
3434
restore-keys: |
3535
${{ runner.os }}-maven-
36-
37-
- name: Build (Maven)
38-
run: mvn -B -DskipTests=false package
39-
40-
- name: Run tests
41-
run: mvn test -B
42-
43-
- name: Upload build artifact (optional)
36+
37+
- name: Build and Test with Maven
38+
run: mvn -B clean package
39+
# 'package' phase includes: compile → test → package
40+
# Tests run automatically unless -DskipTests=true is specified
41+
42+
- name: Upload build artifact
4443
if: success()
4544
uses: actions/upload-artifact@v4
4645
with:
4746
name: mycmd-build
4847
path: target/*.jar
48+
retention-days: 7 # Auto-cleanup after 7 days

0 commit comments

Comments
 (0)