RUM - Add permanent retention filters API spec #21367
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: | |
| - v2 | |
| schedule: | |
| - cron: "0 5 * * *" | |
| concurrency: | |
| group: unit-split-package-${{ 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' | |
| permissions: | |
| id-token: write | |
| contents: read | |
| uses: ./.github/workflows/reusable-pre-commit.yml | |
| with: | |
| enable-commit-changes: true | |
| 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-typescript-test.yml | |
| with: | |
| node-versions: '["18", "20"]' | |
| platforms: '["ubuntu-latest"]' | |
| test-script: './run-tests.sh' | |
| # 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' | |
| # node-version: '16' | |
| report: | |
| runs-on: ubuntu-latest | |
| if: always() && github.event_name == 'pull_request' && contains(github.event.pull_request.head.ref, 'datadog-api-spec/v2/generated/') | |
| needs: | |
| - test | |
| # - examples | |
| permissions: | |
| id-token: write | |
| steps: | |
| - name: Get GitHub App token | |
| if: github.event_name == 'pull_request' | |
| id: get_token | |
| uses: DataDog/dd-octo-sts-action@96a25462dbcb10ebf0bfd6e2ccc917d2ab235b9a # v1.0.4 | |
| with: | |
| scope: DataDog/datadog-api-spec | |
| policy: datadog-api-client-typescript.test.post-status | |
| - name: Get pull request number | |
| id: get_pr_number | |
| run: | | |
| spec_pr=$(echo "${{ github.event.pull_request.head.ref }}" | sed 's/.*generated\/\([0-9]*\).*/\1/') | |
| echo "spec_pr=${spec_pr}" >> $GITHUB_OUTPUT | |
| - 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.test.result == 'cancelled' || needs.examples.result == 'cancelled') && 'pending' || (needs.test.result == 'success' && needs.examples.result == 'success') && 'success' || 'failure' }} | |
| status: ${{ needs.test.result == 'cancelled' && 'pending' || needs.test.result == 'success' && 'success' || 'failure' }} | |
| context: v2/unit | |
| pull-request: ${{ steps.get_pr_number.outputs.spec_pr }} |