Skip to content
Merged
Show file tree
Hide file tree
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
46 changes: 25 additions & 21 deletions .github/workflows/setup-stackql.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'Setup StackQL'
name: 'setup stackql'

on:
push:
Expand All @@ -22,32 +22,36 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4.1.4

- name: Setup Stackql
uses: ./
with:
use_wrapper: ${{matrix.use_wrapper}}

- name: Validate Stackql Version
- name: Get Stackql Version
id: get-stackql-version
run: |
stackql --version
echo "stackql_version<<EOF" >> $GITHUB_ENV
stackql --version >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV

- name: Use GitHub Provider
- name: Validate Stackql Version
run: |
stackql exec -i ./examples/github-example.iql
env:
STACKQL_GITHUB_USERNAME: ${{ secrets.STACKQL_GITHUB_USERNAME }}
STACKQL_GITHUB_PASSWORD: ${{ secrets.STACKQL_GITHUB_PASSWORD }}

- name: Use Google Provider
run: |
stackql exec -i ./examples/google-example.iql
env:
GOOGLE_CREDENTIALS : ${{ secrets.GOOGLE_CREDENTIALS }}

- name: Handle error
if: ${{ matrix.use_wrapper}}
continue-on-error: true
run: | ## specify a query file that doesnt exist
stackql exec -i ./examples/does-not-exist.iql
# 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."
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Check the "Use GitHub Provider" step in [setup-stackql.yml](.github/workflows/se

```yaml
- name: setup StackQL
uses: stackql/setup-stackql@v2.0.0
uses: stackql/setup-stackql@v2.1.0
with:
use_wrapper: true

Expand All @@ -34,7 +34,7 @@ Check the "Use Google Provider" step in [setup-stackql.yml](.github/workflows/se

```yaml
- name: setup StackQL
uses: stackql/setup-stackql@v2.0.0
uses: stackql/setup-stackql@v2.1.0
with:
use_wrapper: true

Expand Down
3 changes: 2 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ inputs:
required: false

runs:
using: 'node16'
using: 'node20'
main: 'dist/index.js'

branding:
icon: 'terminal'
color: 'green'
Loading