Skip to content

Commit 55d92d5

Browse files
committed
Updating workflows to use reusable
1 parent 2c39e2a commit 55d92d5

File tree

1 file changed

+5
-53
lines changed

1 file changed

+5
-53
lines changed

.github/workflows/tests.yaml

Lines changed: 5 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -10,56 +10,8 @@ on:
1010
paths-ignore: ['*.md', 'CODEOWNERS', 'LICENSE']
1111

1212
jobs:
13-
# Runs the pom sorter and code formatter to ensure that the code
14-
# is formatted and poms are sorted according to project rules. This
15-
# will fail if the formatter makes any changes.
16-
check-code-formatting:
17-
runs-on: ubuntu-latest
18-
steps:
19-
- name: Checkout Code
20-
uses: actions/checkout@v1
21-
- name: Set up JDK 11
22-
uses: actions/setup-java@v1
23-
with:
24-
java-version: 11
25-
- uses: actions/cache@v1
26-
with:
27-
path: ~/.m2/repository
28-
key: ${{ runner.os }}-maven-format-${{ hashFiles('**/pom.xml') }}
29-
restore-keys: |
30-
${{ runner.os }}-maven-format-
31-
${{ runner.os }}-maven-
32-
- name: Format code
33-
run: |
34-
mvn -s $GITHUB_WORKSPACE/.github/workflows/settings.xml -V -B -e clean formatter:format sortpom:sort -Pautoformat
35-
git status
36-
git diff-index --quiet HEAD || (echo "Error! There are modified files after formatting." && false)
37-
env:
38-
MAVEN_OPTS: "-Dhttps.protocols=TLSv1.2 -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Djava.awt.headless=true"
39-
USER_NAME: ${{ secrets.USER_NAME }}
40-
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
41-
42-
# Build the code and run the unit/integration tests.
43-
build-and-test:
44-
runs-on: ubuntu-latest
45-
steps:
46-
- name: Checkout Code
47-
uses: actions/checkout@v1
48-
- name: Set up JDK 11
49-
uses: actions/setup-java@v1
50-
with:
51-
java-version: 11
52-
- uses: actions/cache@v1
53-
with:
54-
path: ~/.m2/repository
55-
key: ${{ runner.os }}-maven-build-${{ hashFiles('**/pom.xml') }}
56-
restore-keys: |
57-
${{ runner.os }}-maven-build-
58-
${{ runner.os }}-maven-format-
59-
${{ runner.os }}-maven-
60-
- name: Build and Run Unit Tests
61-
run: mvn -s $GITHUB_WORKSPACE/.github/workflows/settings.xml -V -B -e -Ddist clean verify
62-
env:
63-
MAVEN_OPTS: "-Dhttps.protocols=TLSv1.2 -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Djava.awt.headless=true"
64-
USER_NAME: ${{ secrets.USER_NAME }}
65-
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
13+
call-reusable-workflow:
14+
uses: nationalsecurityagency/datawave/.github/workflows/microservice-maven-tests.yaml@integration
15+
secrets:
16+
USER_NAME: ${{ secrets.USER_NAME }}
17+
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}

0 commit comments

Comments
 (0)