Skip to content

Commit

Permalink
ci: make preflight tests available in any regions (#4013)
Browse files Browse the repository at this point in the history
This could be used to test larger changes, and eventually from CI someday.
  • Loading branch information
kzys authored Oct 21, 2024
1 parent a6df2bb commit 8fb314c
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/preflight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Preflight Tests
on:
workflow_dispatch:
inputs:
reason:
description: Brief reason for running this workflow manually
region:
description: Region
required: false
default: User initiated run
default: ord
type: string
workflow_call:

Expand All @@ -17,7 +17,6 @@ jobs:
strategy:
fail-fast: false
matrix:
vm_size: [""]
parallelism: [20]
index: [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]
steps:
Expand All @@ -33,22 +32,24 @@ jobs:
run: |
curl -sfL https://raw.githubusercontent.com/Songmu/gotesplit/v0.2.1/install.sh | sh -s
echo "FLY_PREFLIGHT_TEST_APP_PREFIX=pf-gha-$(openssl rand -hex 4)" >> "$GITHUB_ENV"
# If this workflow is triggered by code changes (eg PRs), download the binary to save time.
- uses: actions/download-artifact@v4
with:
name: flyctl
path: master-build
continue-on-error: true
# But if this is a manual run, build the binary first.
- run: make
- name: Run preflight tests
id: preflight
env:
FLY_PREFLIGHT_TEST_ACCESS_TOKEN: ${{ secrets.FLYCTL_PREFLIGHT_CI_FLY_API_TOKEN }}
FLY_PREFLIGHT_TEST_FLY_ORG: flyctl-ci-preflight
# This VM size is only available in ORD.
FLY_PREFLIGHT_TEST_FLY_REGIONS: ord
FLY_PREFLIGHT_TEST_FLY_REGIONS: ${{ inputs.region }}
FLY_PREFLIGHT_TEST_NO_PRINT_HISTORY_ON_FAIL: "true"
FLY_FORCE_TRACE: "true"
FLY_PREFLIGHT_TEST_VM_SIZE: ${{ matrix.vm_size }}
run: |
mv master-build/flyctl bin/flyctl
(test -e master-build/flyctl) && mv master-build/flyctl bin/flyctl
chmod +x bin/flyctl
export PATH=$PWD/bin:$PATH
echo -n failed= >> $GITHUB_OUTPUT
Expand Down

0 comments on commit 8fb314c

Please sign in to comment.