Make /validate check for field existence in date range #1231
  
    
      This file contains hidden or 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
    
  
  
    
  | name: Main Repo Tests | |
| on: | |
| push: | |
| paths-ignore: ['**/*.md', '.github/**', 'CODEOWNERS', 'LICENSE', 'microservices/**'] | |
| branches: | |
| - 'integration' | |
| - 'release/version*' | |
| pull_request: | |
| paths-ignore: ['**/*.md', '.github/**', 'CODEOWNERS', 'LICENSE', 'microservices/**'] | |
| merge_group: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| JAVA_VERSION: '11' | |
| JAVA_DISTRIBUTION: 'zulu' #This is the default on v1 of the action for 1.8 | |
| MAVEN_OPTS: "-Djansi.force=true -Dhttps.protocols=TLSv1.2 -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Djava.awt.headless=true -XX:ThreadStackSize=1m -Daether.connector.basic.threads=8 -Daether.metadataResolver.threads=8 -Daether.syncContext.named.time=480" | |
| GITHUB_REGISTRY: ghcr.io | |
| GITHUB_USERNAME: ${{ secrets.GHCR_WRITE_USER_NAME }} | |
| GITHUB_PASSWORD: ${{ secrets.GHCR_WRITE_ACCESS_TOKEN }} | |
| jobs: | |
| configure-runner: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - id: set_output_step # at least one step is required in a job | |
| run: | | |
| echo "Determining runner to be ${{vars.RUNNER_TYPE}}" | |
| echo "runner=${{vars.RUNNER_TYPE}}" >> $GITHUB_OUTPUT | |
| if [[ "${{ vars.RUNNER_TYPE }}" == "self-hosted" ]]; then | |
| echo "runner is self-hosted" | |
| echo "cache_settings=-Dmaven.build.cache.remote.save.enabled=true -Dmaven.build.cache.enabled=true -Dmaven.build.cache.remote.enabled=true -Dmaven.build.cache.remote.url=http://localhost:12345" >> $GITHUB_OUTPUT | |
| else | |
| echo "runner is not self-hosted" | |
| echo cache_settings="" >> $GITHUB_OUTPUT | |
| fi | |
| echo $GITHUB_OUTPUT | |
| outputs: | |
| runner: ${{ steps.set_output_step.outputs.runner }} | |
| cache_settings: ${{ steps.set_output_step.outputs.cache_settings }} | |
| # Runs the pom sorter and code formatter to ensure that the code | |
| # is formatted and poms are sorted according to project rules. If changes are found, | |
| # they are committed back to the branch | |
| # Build the code and run the unit/integration tests. | |
| build-and-test-microservices: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Passing build | |
| run: echo "This build executes solely so we can set branch protections on integration to look for build-and-test-microservices" | |
| build-and-test-main: | |
| needs: configure-runner | |
| runs-on: ${{ needs.configure-runner.outputs.runner }} | |
| steps: | |
| - name: Set owner of working dir and m2 dir recursively | |
| #Needed because compose can leave around files owned by root. | |
| run: | | |
| if [[ "${{ needs.configure-runner.outputs.runner }}" == "self-hosted" ]]; then | |
| sudo chown -R $(whoami) . ~/.m2 || true | |
| fi | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| # Clean up free space | |
| - uses: ./.github/actions/free-space | |
| with: | |
| tool-cache: false | |
| - name: Set up JDK ${{env.JAVA_VERSION}} | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: ${{env.JAVA_DISTRIBUTION}} | |
| java-version: ${{env.JAVA_VERSION}} | |
| cache: 'maven' | |
| server-id: github-datawave | |
| # username and password are the env variables names that maven will use | |
| server-username: GITHUB_USERNAME | |
| server-password: GITHUB_PASSWORD | |
| - name: Build and Run Unit Tests | |
| run: | | |
| mvn --show-version --batch-mode --errors --no-transfer-progress "-Dstyle.color=always" -Pexamples,assemble,spotbugs ${{ needs.configure-runner.outputs.cache_settings }} -Ddeploy -Ddist -T1C clean install -Dsurefire.rerunFailingTestsCount=3 -Dutils -DskipITs -DskipFormat | |
| - name: Run Integration Tests | |
| run: | | |
| mvn --show-version --batch-mode --errors --no-transfer-progress "-Dstyle.color=always" ${{ needs.configure-runner.outputs.cache_settings }} -Ddeploy -T1C verify -Dfailsafe.rerunFailingTestsCount=3 -Dutils -DskipUTs -DskipFormat -DskipSpotbugs -Denforcer.skip=true -Dcheckstyle.skip=true | |