Skip to content

feat: auto-trigger code sample testing #9

feat: auto-trigger code sample testing

feat: auto-trigger code sample testing #9

name: Test API Docs Code Samples
on:
push:
paths:
- 'apify-api/openapi/code_samples/**'
pull_request:
paths:
- 'apify-api/openapi/code_samples/**'
jobs:
run-code-sample-tests:
runs-on: ubuntu-latest
steps:
- name: Call Code Sample Tester Actor
env:
# APIFY_TOKEN: ${{ secrets.CODE_SAMPLE_TESTER_ACTOR_TOKEN }}
APIFY_TOKEN: apify_api_cUpIjxWrtMdy6Ctqnz9PhYyTjdqWcI4tjFTr
BRANCH_NAME: ${{ github.ref_name }}
run: |
curl --fail-with-body -X POST "https://api.apify.com/v2/acts/X8D0L4wfpO8fCL1uL/run-sync" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $APIFY_TOKEN" \
-d '{ "branch": "'"$BRANCH_NAME"'" }'