Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/test-code-samples.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
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 }}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll need to add a token for this once the actor is moved to the Apify account

BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
REPO_OWNER: ${{ github.actor }}
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"'", "repoOwner": "'"$REPO_OWNER"'" }'
Loading