Skip to content

Commit 4a32153

Browse files
authored
fix: skip Azure e2e without token (#22)
1 parent 3204c6c commit 4a32153

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,20 @@ jobs:
3838
uses: actions/setup-node@v5
3939
with:
4040
node-version: 22.x
41-
- name: npm ci
42-
run: npm ci
4341
- name: Check Azure PAT
42+
id: azure-pat
4443
run: |
4544
if [ -z "${AZURE_DEVOPS_TOKEN_OPENUPM_PIPELINE:-}" ]; then
46-
echo "AZURE_DEVOPS_TOKEN_OPENUPM_PIPELINE is required for Azure E2E."
47-
exit 1
45+
echo "AZURE_DEVOPS_TOKEN_OPENUPM_PIPELINE is not configured; skipping Azure E2E."
46+
echo "has_token=false" >> "$GITHUB_OUTPUT"
47+
else
48+
echo "has_token=true" >> "$GITHUB_OUTPUT"
4849
fi
50+
- name: npm ci
51+
if: steps.azure-pat.outputs.has_token == 'true'
52+
run: npm ci
4953
- name: Run Azure git e2e fixture
54+
if: steps.azure-pat.outputs.has_token == 'true'
5055
run: |
5156
node scripts/runAzureFixture.js \
5257
--source-branch "$SOURCE_BRANCH" \
@@ -56,6 +61,7 @@ jobs:
5661
--package-version "1.0.1" \
5762
--package-source "git"
5863
- name: Run Azure GitHub Release asset e2e fixture
64+
if: steps.azure-pat.outputs.has_token == 'true'
5965
env:
6066
ASSET_URL: https://raw.githubusercontent.com/${{ github.repository }}/${{ github.sha }}/test/fixtures/assets/com.example.release-asset-1.0.0.tgz
6167
run: |

0 commit comments

Comments
 (0)