Skip to content
This repository was archived by the owner on Apr 10, 2024. It is now read-only.

Commit 75c2f6b

Browse files
authored
feat: Simple PR Github Workflow (#17)
1 parent 9496a25 commit 75c2f6b

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/pr.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Verify Pull Request
2+
3+
env:
4+
MAVEN_ARGS: -V -ntp -e
5+
6+
concurrency:
7+
cancel-in-progress: true
8+
group: ${{ github.ref }}-${{ github.workflow }}
9+
10+
on:
11+
pull_request:
12+
branches: [ main ]
13+
workflow_dispatch:
14+
15+
jobs:
16+
check_format_and_tests:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v3
20+
- name: Set up Java and Maven
21+
uses: actions/setup-java@v3
22+
with:
23+
distribution: temurin
24+
java-version: 17
25+
cache: 'maven'
26+
- name: Check code format
27+
run: |
28+
./mvnw ${MAVEN_ARGS} formatter:validate -Dconfigfile=$PWD/contributing/eclipse-google-style.xml --file pom.xml
29+
./mvnw ${MAVEN_ARGS} impsort:check --file pom.xml
30+
- name: Run unit tests
31+
run: ./mvnw ${MAVEN_ARGS} -B test --file pom.xml
32+

0 commit comments

Comments
 (0)