Skip to content

Commit 7faf95e

Browse files
Merge pull request #15 from stackql/feature/os-matrix-runner
added test matrix job in the workflow
2 parents 2e8e297 + 25e7b2a commit 7faf95e

File tree

6 files changed

+195
-249
lines changed

6 files changed

+195
-249
lines changed

.github/workflows/setup-stackql.yml

Lines changed: 13 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -12,78 +12,18 @@ defaults:
1212
shell: bash
1313

1414
jobs:
15-
stackql-tests-linux:
16-
name: 'Stackql Tests (Linux)'
17-
runs-on: ubuntu-latest
15+
stackql-test-matrix:
16+
name: Stackql Local Run ${{ matrix.os }}
17+
runs-on: ${{ matrix.os }}
18+
strategy:
19+
matrix:
20+
os: [ubuntu-latest, windows-latest, macos-latest]
1821

1922
steps:
2023
- name: Checkout
2124
uses: actions/checkout@v3
2225

23-
- name: Setup stackql
24-
uses: ./
25-
26-
- name: Validate Stackql Version
27-
run: |
28-
stackql --version
29-
30-
- name: Use GitHub Provider
31-
run: |
32-
stackql exec -i ./examples/github-example.iql --auth='{ "github": { "type": "basic", "credentialsenvvar": "STACKQL_GITHUB_CREDS" } }'
33-
env:
34-
STACKQL_GITHUB_CREDS: ${{ secrets.STACKQL_GITHUB_CREDS }}
35-
36-
- name: Prep Google Creds (bash)
37-
run: | ## use the secret to create json file
38-
sudo echo ${{ secrets.GOOGLE_CREDS }} | base64 -d > sa-key.json
39-
40-
- name: Use Google Provider
41-
run: |
42-
stackql exec -i ./examples/google-example.iql --auth='{ "google": { "type": "service_account", "credentialsfilepath": "sa-key.json" }}'
43-
44-
##### uncomment the step to see error handling
45-
# - name: Handle error
46-
# run: | ## use the secret to create json file
47-
# stackql exec -i ./examples/github-example.iql --auth="${INVALID_AUTH}"
48-
49-
stackql-tests-mac:
50-
name: 'Stackql Tests (MacOS)'
51-
runs-on: macos-latest
52-
53-
steps:
54-
- name: Checkout
55-
uses: actions/checkout@v3
56-
57-
- name: Setup stackql
58-
uses: ./
59-
60-
- name: Validate Stackql Version
61-
run: |
62-
stackql --version
63-
64-
- name: Use GitHub Provider
65-
run: |
66-
stackql exec -i ./examples/github-example.iql --auth='{ "github": { "type": "basic", "credentialsenvvar": "STACKQL_GITHUB_CREDS" } }'
67-
env:
68-
STACKQL_GITHUB_CREDS: ${{ secrets.STACKQL_GITHUB_CREDS }}
69-
70-
- name: Prep Google Creds (bash)
71-
run: | ## use the secret to create json file
72-
sudo echo ${{ secrets.GOOGLE_CREDS }} | base64 -d > sa-key.json
73-
74-
- name: Use Google Provider
75-
run: |
76-
stackql exec -i ./examples/google-example.iql --auth='{ "google": { "type": "service_account", "credentialsfilepath": "sa-key.json" }}'
77-
78-
stackql-tests-windows:
79-
name: 'Stackql Tests (Windows)'
80-
runs-on: windows-latest
81-
82-
steps:
83-
- name: Checkout
84-
uses: actions/checkout@v3
85-
86-
- name: Setup stackql
26+
- name: Setup Stackql
8727
uses: ./
8828

8929
- name: Validate Stackql Version
@@ -107,4 +47,9 @@ jobs:
10747

10848
- name: Use Google Provider
10949
run: |
110-
stackql exec -i ./examples/google-example.iql --auth='{ "google": { "type": "service_account", "credentialsfilepath": "sa-key.json" }}'
50+
stackql exec -i ./examples/google-example.iql --auth='{ "google": { "type": "service_account", "credentialsfilepath": "sa-key.json" }}'
51+
52+
##### uncomment the step to see error handling
53+
# - name: Handle error
54+
# run: | ## use the secret to create json file
55+
# stackql exec -i ./examples/github-example.iql --auth="${INVALID_AUTH}"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ This action can be run on `ubuntu-latest`, `windows-latest`, and `macos-latest`
2020
2. create the github token as a secret
2121
3. In the execution step, pass the secret as environment variable with name "STACKQL_GITHUB_CREDS"
2222

23-
Check the "Use GitHub Provider" step in `.github/workflows/example-workflows.yml` for the working example
23+
Check the "Use GitHub Provider" step in `.github/workflows/setup-stackql.yml` for the working example
2424

2525
### json File Auth example
2626

@@ -31,4 +31,4 @@ Check the "Use GitHub Provider" step in `.github/workflows/example-workflows.yml
3131
2. encode the key json file into base64 string
3232
3. in execution step, run `sudo echo ${{ secrets.<name of the secret> }} | base64 -d > sa-key.json`
3333

34-
Check the "Use Google Provider" step in `.github/workflows/example-workflows.yml` for the working example
34+
Check the "Use Google Provider" step in `.github/workflows/setup-stackql.yml` for the working example

action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ inputs: {}
66
# description: 'Whether or not to install a wrapper to wrap subsequent calls of the `stackql` binary and expose its STDOUT, STDERR, and exit code as outputs named `stdout`, `stderr`, and `exitcode` respectively. Defaults to `true`.'
77
# default: 'true'
88
# required: false
9+
910
runs:
1011
using: 'node16'
1112
main: 'dist/index.js'

0 commit comments

Comments
 (0)