-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
20 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Build and Push Image | ||
|
||
on: | ||
push: | ||
paths-ignore: ['*.md', 'CODEOWNERS', 'LICENSE'] | ||
tags: | ||
- "**" | ||
branches: | ||
- 'integration' | ||
- 'release/version*' | ||
- 'docker-images' | ||
workflow_dispatch: | ||
jobs: | ||
call-reusable-workflow: | ||
uses: nationalsecurityagency/datawave/.github/workflows/microservice-build-image.yaml@integration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,65 +1,14 @@ | ||
name: Tests | ||
name: Run Maven Tests | ||
|
||
on: | ||
push: | ||
paths-ignore: ['*.md', 'CODEOWNERS', 'LICENSE'] | ||
branches: | ||
- 'main' | ||
- 'release/*' | ||
- 'main' | ||
- 'release/*' | ||
pull_request: | ||
paths-ignore: ['*.md', 'CODEOWNERS', 'LICENSE'] | ||
|
||
jobs: | ||
# Runs the pom sorter and code formatter to ensure that the code | ||
# is formatted and poms are sorted according to project rules. This | ||
# will fail if the formatter makes any changes. | ||
check-code-formatting: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v1 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11 | ||
- uses: actions/cache@v1 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-format-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-maven-format- | ||
${{ runner.os }}-maven- | ||
- name: Format code | ||
run: | | ||
mvn -s $GITHUB_WORKSPACE/.github/workflows/settings.xml -V -B -e clean formatter:format sortpom:sort -Pautoformat | ||
git status | ||
git diff-index --quiet HEAD || (echo "Error! There are modified files after formatting." && false) | ||
env: | ||
MAVEN_OPTS: "-Dhttps.protocols=TLSv1.2 -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Djava.awt.headless=true" | ||
USER_NAME: ${{ secrets.USER_NAME }} | ||
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} | ||
|
||
# Build the code and run the unit/integration tests. | ||
build-and-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v1 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11 | ||
- uses: actions/cache@v1 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-build-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-maven-build- | ||
${{ runner.os }}-maven-format- | ||
${{ runner.os }}-maven- | ||
- name: Build and Run Unit Tests | ||
run: mvn -s $GITHUB_WORKSPACE/.github/workflows/settings.xml -V -B -e -Ddist clean verify | ||
env: | ||
MAVEN_OPTS: "-Dhttps.protocols=TLSv1.2 -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Djava.awt.headless=true" | ||
USER_NAME: ${{ secrets.USER_NAME }} | ||
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} | ||
call-reusable-workflow: | ||
uses: nationalsecurityagency/datawave/.github/workflows/microservice-maven-tests.yaml@integration |