66 - ' scenario*'
77
88env :
9- GH_ACCESS_TOKEN : ${{ secrets.ACTIONS_PRIVATE_PACKAGE_SECRET }}
9+ TAG_NAME : ${{ github.ref_name }}
1010
1111jobs :
1212 scenario-testing :
1313 runs-on : ubuntu-latest
14+ timeout-minutes : ${{ vars.DEFAULT_JOB_TIMEOUT_MIN == '' && 120 || vars.DEFAULT_JOB_TIMEOUT_MIN }}
1415 steps :
15- - name : Checkout
16- uses : actions/checkout@v4
17- with :
18- fetch-depth : 0
19- - name : Setup Go
20- uses : actions/setup-go@v4
21- with :
22- go-version : ^1.19
23- - name : Install cross-compiler for linux/arm64
24- run : sudo apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
25- - name : Run Goreleaser
26- uses : goreleaser/goreleaser-action@v5
27- with :
28- version : latest
29- args : release --clean --config .github/goreleaser/.goreleaser-for-linux.yaml --verbose
30- env :
31- GITHUB_TOKEN : ${{env.GH_ACCESS_TOKEN}}
16+ - name : Ref Parse
17+ run : |
18+ {
19+ echo "runID=$(echo -n '${{ github.ref_name }}' | cut -d '-' -f 2)"
20+ } >> "${GITHUB_ENV}"
3221
33- build-macos-binary :
34- runs-on : macos-latest
35- steps :
36- - name : Checkout
37- uses : actions/checkout@v4
38- with :
39- fetch-depth : 0
40- - name : Setup Go
41- uses : actions/setup-go@v4
42- with :
43- go-version : ^1.19
44- - name : Run Goreleaser
45- uses : goreleaser/goreleaser-action@v5
46- with :
47- version : latest
48- args : release --clean --config .github/goreleaser/.goreleaser-for-darwin.yaml --verbose
49- env :
50- GITHUB_TOKEN : ${{env.GH_ACCESS_TOKEN}}
22+ - name : Check out code into the Go module directory
23+ 5124
52- build-windows-binary :
53- runs-on : windows-latest
54- steps :
55- - name : Checkout
56- uses : actions/checkout@v4
57- with :
58- fetch-depth : 0
59- - name : Setup Go
60- uses : actions/setup-go@v4
61- with :
62- go-version : ^1.19
63- - name : Run Goreleaser
64- uses : goreleaser/goreleaser-action@v5
25+ - name : Download Artifact
26+ 6527 with :
66- version : latest
67- args : release --clean --config .github/goreleaser/.goreleaser-for-windows.yaml --verbose
28+ name : stackql_linux_amd64
29+ path : build
30+ github-token : ${{ secrets.CI_STACKQL_PACKAGE_DOWNLOAD_TOKEN }}
31+ run-id : ${{ env.runID }}
32+
33+ - name : Stackql permissions
34+ run : |
35+ sudo chmod a+rwx build/stackql
36+ ls -al build/stackql
37+ {
38+ echo "PATH=$PATH:$(pwd)/build/stackql"
39+ } >> "${GITHUB_ENV}"
40+
41+ - name : Check Stackql Version
42+ run : |
43+ stackql --version
44+
45+ - name : Persist secrets
46+ run : |
47+ echo "$GCP_RO_SECRET" >> cicd/keys/testing/google-ro-credentials.json
48+ shell : bash
6849 env :
69- GITHUB_TOKEN : ${{env.GH_ACCESS_TOKEN}}
50+ GCP_RO_SECRET : ${{ secrets.CI_SCENARIO_GCP_RO_SECRET }}
51+
52+ - name : Install Python dependencies
53+ run : |
54+ pip3 install -r cicd/requirements.txt
55+
56+ - name : Run Walkthrough Scenarios
57+ run : |
58+ python3 test/python/markdown_testing/markdown_testing.py 2>&1 | tee cicd/log/markdown-testing-results.log
59+
60+ - name : Upload Test Results
61+ 62+ with :
63+ name : scenario_test_results
64+ path : cicd/log/markdown-testing-results.log
65+
66+ - name : Cleanup
67+ if : always()
68+ run : |
69+ rm -rf cicd/keys/testing
70+
0 commit comments