homebrew fix #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'setup stackql test' | |
on: | |
push: | |
branches: | |
- main | |
- 'develop-**' | |
pull_request: | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
stackql-test-matrix: | |
name: Stackql local run on ${{ matrix.os }} ${{ matrix.use_wrapper && 'with' || 'without' }} wrapper | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
use_wrapper: [true, false] | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Setup Stackql | |
uses: ./ | |
with: | |
use_wrapper: ${{matrix.use_wrapper}} | |
- name: Get Stackql Version | |
id: get-stackql-version | |
run: | | |
echo "stackql_version<<EOF" >> $GITHUB_ENV | |
stackql --version >> $GITHUB_ENV | |
echo "EOF" >> $GITHUB_ENV | |
- name: Validate Stackql Version | |
run: | | |
# Extract only the relevant line containing version information | |
VERSION_OUTPUT=$(echo "${{ env.stackql_version }}" | grep -E 'stackql v[0-9]+\.[0-9]+\.[0-9]+') | |
echo "Version output: $VERSION_OUTPUT" | |
SEMVER_REGEX="v[0-9]+\.[0-9]+\.[0-9]+" | |
PLATFORM_REGEX="(Linux|Darwin|Windows|Homebrew)" | |
if ! [[ "$VERSION_OUTPUT" =~ $SEMVER_REGEX ]]; then | |
echo "Semantic version does not match expected format" | |
exit 1 | |
fi | |
if ! [[ "$VERSION_OUTPUT" =~ $PLATFORM_REGEX ]]; then | |
echo "Platform information does not match expected formats" | |
exit 1 | |
fi | |
echo "version output validated successfully." |