Post an event v2 API - add a new enum value to links.category field and add pattern validation on changed_resource.name field #17468
Workflow file for this run
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: Run Tests | |
| permissions: | |
| contents: read | |
| env: | |
| GIT_AUTHOR_EMAIL: "packages@datadoghq.com" | |
| GIT_AUTHOR_NAME: "ci.datadog-api-spec" | |
| on: | |
| pull_request: | |
| branches: | |
| - master | |
| schedule: | |
| - cron: "0 4 * * *" | |
| concurrency: | |
| group: unit-${{ github.head_ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| pre-commit: | |
| if: > | |
| (github.event.pull_request.draft == false && | |
| !contains(github.event.pull_request.labels.*.name, 'ci/skip') && | |
| !contains(github.event.pull_request.head.ref, 'datadog-api-spec/test/')) || | |
| github.event_name == 'schedule' | |
| uses: ./.github/workflows/reusable-pre-commit.yml | |
| with: | |
| enable-commit-changes: true | |
| secrets: | |
| PIPELINE_GITHUB_APP_ID: ${{ secrets.PIPELINE_GITHUB_APP_ID }} | |
| PIPELINE_GITHUB_APP_PRIVATE_KEY: ${{ secrets.PIPELINE_GITHUB_APP_PRIVATE_KEY }} | |
| javadoc: | |
| if: > | |
| (github.event.pull_request.draft == false && | |
| !contains(github.event.pull_request.labels.*.name, 'ci/skip') && | |
| !contains(github.event.pull_request.head.ref, 'datadog-api-spec/test/')) || | |
| github.event_name == 'schedule' | |
| uses: ./.github/workflows/reusable-javadoc.yml | |
| shading: | |
| if: > | |
| (github.event.pull_request.draft == false && | |
| !contains(github.event.pull_request.labels.*.name, 'ci/skip') && | |
| !contains(github.event.pull_request.head.ref, 'datadog-api-spec/test/')) || | |
| github.event_name == 'schedule' | |
| uses: ./.github/workflows/reusable-shading.yml | |
| test: | |
| if: > | |
| (github.event.pull_request.draft == false && | |
| !contains(github.event.pull_request.labels.*.name, 'ci/skip') && | |
| !contains(github.event.pull_request.head.ref, 'datadog-api-spec/test/')) || | |
| github.event_name == 'schedule' | |
| uses: ./.github/workflows/reusable-java-test.yml | |
| with: | |
| java-versions: '["8", "16", "18", "19"]' | |
| platforms: '["ubuntu-latest"]' | |
| test-script: './run-tests.sh' | |
| secrets: | |
| PIPELINE_GITHUB_APP_ID: ${{ secrets.PIPELINE_GITHUB_APP_ID }} | |
| PIPELINE_GITHUB_APP_PRIVATE_KEY: ${{ secrets.PIPELINE_GITHUB_APP_PRIVATE_KEY }} | |
| DD_API_KEY: ${{ secrets.DD_API_KEY }} | |
| examples: | |
| if: > | |
| (github.event.pull_request.draft == false && | |
| !contains(github.event.pull_request.labels.*.name, 'ci/skip') && | |
| !contains(github.event.pull_request.head.ref, 'datadog-api-spec/test/')) || | |
| github.event_name == 'schedule' | |
| uses: ./.github/workflows/reusable-examples.yml | |
| with: | |
| examples-script: './check-examples.sh' | |
| java-version: '16' | |
| report: | |
| runs-on: ubuntu-latest | |
| if: always() && github.event_name == 'pull_request' && contains(github.event.pull_request.head.ref, 'datadog-api-spec/generated/') | |
| needs: | |
| - test | |
| - examples | |
| - javadoc | |
| - shading | |
| steps: | |
| - name: Get GitHub App token | |
| if: github.event_name == 'pull_request' | |
| id: get_token | |
| uses: actions/create-github-app-token@v1 | |
| with: | |
| app-id: ${{ secrets.PIPELINE_GITHUB_APP_ID }} | |
| private-key: ${{ secrets.PIPELINE_GITHUB_APP_PRIVATE_KEY }} | |
| repositories: datadog-api-spec | |
| - name: Post status check | |
| uses: DataDog/github-actions/post-status-check@v2 | |
| with: | |
| github-token: ${{ steps.get_token.outputs.token }} | |
| repo: datadog-api-spec | |
| status: ${{ (needs.javadoc.result == 'cancelled' || needs.test.result == 'cancelled' || needs.examples.result == 'cancelled' || needs.shading.result == 'cancelled') && 'pending' || (needs.javadoc.result == 'success' && needs.test.result == 'success' && needs.examples.result == 'success' && needs.shading.result == 'success') && 'success' || 'failure' }} | |
| context: master/unit |