Skip to content

Commit b715362

Browse files
committed
consolidate setup phase to reduce redundancy
1 parent ae03389 commit b715362

File tree

4 files changed

+6
-28
lines changed

4 files changed

+6
-28
lines changed

.github/actions/publish-self-hostable-docs/action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ inputs:
99
runs:
1010
using: composite
1111
steps:
12+
13+
- name: Run self-hosted tests
14+
uses: ./.github/actions/run-self-hosted-tests
15+
1216
- name: Check for Environment Variables
1317
id: check_env
1418
shell: bash
Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,9 @@
11
name: Run Self-Hosted Tests
22
description: Run self-hosted tests for the platform
33

4-
inputs:
5-
timeout-minutes:
6-
description: 'Timeout in minutes for the test run'
7-
required: false
8-
default: '20'
9-
104
runs:
115
using: composite
126
steps:
13-
- name: Check if setup has been run
14-
shell: bash
15-
run: |
16-
if [ ! -d "node_modules" ] || [ ! -f "packages/self-hosted/dist/index.js" ]; then
17-
echo "❌ Error: setup-self-hosted-docs action must be run before this action"
18-
echo ""
19-
echo "Please add this step to your workflow before calling run-self-hosted-tests:"
20-
echo " - name: Setup Self-Hosted Docs"
21-
echo " uses: ./.github/actions/setup-self-hosted-docs"
22-
echo " env:"
23-
echo " FERN_TOKEN: \${{ secrets.FERN_TOKEN }}"
24-
echo " WORKOS_API_KEY: \${{ secrets.WORKOS_API_KEY }}"
25-
echo " WORKOS_CLIENT_ID: \${{ secrets.WORKOS_CLIENT_ID }}"
26-
exit 1
27-
fi
28-
echo "✅ Setup detected, proceeding with tests"
29-
307
- name: Run self-hosted tests
318
shell: bash
329
run: pnpm turbo build test:self-hosted --filter=@fern-platform/self-hosted

.github/workflows/publish-self-hostable-docs.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ jobs:
2929
WORKOS_API_KEY: ${{ secrets.WORKOS_API_KEY }}
3030
WORKOS_CLIENT_ID: ${{ secrets.WORKOS_CLIENT_ID }}
3131

32-
- name: Run Self-Hosted Tests
33-
uses: ./.github/actions/run-self-hosted-tests
34-
3532
- name: Publish Self-Hostable Docs
3633
uses: ./.github/actions/publish-self-hostable-docs
3734
with:

.github/workflows/run-self-hosted-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ jobs:
1515
- uses: actions/checkout@v4
1616
with:
1717
fetch-depth: 2 # This helps turbo resolve changes faster
18-
18+
1919
- name: Setup Self-Hosted Docs
2020
uses: ./.github/actions/setup-self-hosted-docs
2121
env:
2222
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
2323
WORKOS_API_KEY: ${{ secrets.WORKOS_API_KEY }}
2424
WORKOS_CLIENT_ID: ${{ secrets.WORKOS_CLIENT_ID }}
25-
25+
2626
- name: Run self-hosted tests
2727
uses: ./.github/actions/run-self-hosted-tests

0 commit comments

Comments
 (0)