Skip to content
Merged
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
21 changes: 15 additions & 6 deletions .github/workflows/regression.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ jobs:
branch-coverage: ${{ steps.verify.outputs.branch-coverage }}

steps:
- name: Validate connector input
run: |
CONNECTOR="${{ inputs.connector }}"
if [[ ! "$CONNECTOR" =~ ^baton-[a-zA-Z0-9_-]+$ ]]; then
echo "::error::Invalid connector name: must match baton-<name> with alphanumeric/hyphens/underscores"
exit 1
fi

- name: Checkout baton-regression
uses: actions/checkout@v4
with:
Expand All @@ -69,15 +77,15 @@ jobs:
with:
repository: ${{ inputs.connector-repo || github.repository }}
ref: ${{ inputs.connector-ref || github.sha }}
path: connector
path: ${{ inputs.connector }}

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: baton-regression/go.mod
cache-dependency-path: |
baton-regression/go.sum
connector/go.sum
${{ inputs.connector }}/go.sum

- name: Build baton-regression
working-directory: baton-regression
Expand All @@ -87,7 +95,7 @@ jobs:
./cmd/baton-regression

- name: Build connector
working-directory: connector
working-directory: ${{ inputs.connector }}
run: |
CONNECTOR_NAME="${{ inputs.connector }}"
# Handle both "okta" and "baton-okta" formats
Expand Down Expand Up @@ -115,15 +123,16 @@ jobs:
BINARY_NAME="baton-$CONFIG_NAME"

ARGS="--binary ./bin/$BINARY_NAME"
ARGS="$ARGS --source ../connector"
ARGS="$ARGS --source ../${{ inputs.connector }}"
ARGS="$ARGS --max-probes ${{ inputs.max-probes }}"
ARGS="$ARGS --target-coverage 95"

if [ "${{ inputs.verbose }}" = "true" ]; then
ARGS="$ARGS -v"
fi

echo "Running: ./bin/baton-regression verify $CONFIG_NAME $ARGS"
./bin/baton-regression verify $CONFIG_NAME $ARGS 2>&1 | tee ./reports/verification.log
echo "Running: ./bin/baton-regression verify $ARGS $CONFIG_NAME"
./bin/baton-regression verify $ARGS $CONFIG_NAME 2>&1 | tee ./reports/verification.log
EXIT_CODE=${PIPESTATUS[0]}

# Parse results from log
Expand Down