.github/workflows/test.yml in datadog_api_client-1.4.0 vs .github/workflows/test.yml in datadog_api_client-1.5.0
- old
+ new
@@ -55,14 +55,32 @@
cache-version: ${{ secrets.CACHE_VERSION }}
- name: Test
run: ./run-tests.sh
shell: bash
+ examples:
+ runs-on: ubuntu-latest
+ 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/')
+ steps:
+ - uses: actions/checkout@v2
+ - name: Set up Ruby
+ uses: ruby/setup-ruby@v1
+ with:
+ ruby-version: "2.7"
+ bundler-cache: true
+ # modify repository secret when there are problems with installing gems
+ cache-version: ${{ secrets.CACHE_VERSION }}
+ - name: Check examples
+ run: ./check-examples.sh
+ shell: bash
+
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
+ needs:
+ - test
+ - examples
steps:
- name: Get GitHub App token
if: github.event_name == 'pull_request'
id: get_token
uses: tibdex/github-app-token@v1.3.0
@@ -75,7 +93,7 @@
- name: Post status check
uses: DataDog/github-actions/post-status-check@v1.0.0
with:
github-token: ${{ steps.get_token.outputs.token }}
repo: datadog-api-spec
- status: ${{ needs.test.result }}
+ status: ${{ needs.test.result == 'success' && needs.examples.result == 'success' && 'success' || 'failure' }}
context: unit