Skip to content

Commit f0098f3

Browse files
committed
Create build-and-test-maven.yml
1 parent bef5a07 commit f0098f3

File tree

3 files changed

+40
-19
lines changed

3 files changed

+40
-19
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
3+
4+
# This workflow uses actions that are not certified by GitHub.
5+
# They are provided by a third-party and are governed by
6+
# separate terms of service, privacy policy, and support
7+
# documentation.
8+
9+
name: Java CI with Maven
10+
run-name: ${{ github.actor }} is building and testing with Maven πŸš€
11+
12+
on:
13+
push:
14+
branches: [ "develop" ]
15+
pull_request:
16+
branches: [ "develop" ]
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- run: echo "πŸŽ‰ The job was automatically triggered by a ${{ github.event_name }} event"
24+
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
25+
- run: echo "πŸ”Ž The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
26+
- name: Check out repository code
27+
uses: actions/checkout@v4
28+
- name: Set up JDK 17
29+
uses: actions/setup-java@v4
30+
with:
31+
java-version: '17'
32+
distribution: 'temurin'
33+
cache: maven
34+
- name: Build with Maven
35+
run: mvn -B package --file pom.xml
36+
- name: List files in the repository
37+
run: |
38+
ls ${{ github.workspace }}
39+
- run: echo "🍏 This job's status is ${{ job.status }}."

β€Ž.github/workflows/github-actions-demo.ymlβ€Ž

Lines changed: 0 additions & 18 deletions
This file was deleted.

β€Žpom.xmlβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,4 +117,4 @@
117117
</plugin>
118118
</plugins>
119119
</reporting>
120-
</project>
120+
</project>

0 commit comments

Comments
Β (0)