feat: add functions to sdk #21
Workflow file for this run
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
# Run secret-dependent integration tests only after /ok-to-test approval | |
on: | |
repository_dispatch: | |
types: [ok-to-test-command] | |
pull_request: | |
name: test-unit-and-integration | |
jobs: | |
unit: | |
name: test | |
runs-on: ubuntu-latest | |
if: (github.event_name == 'repository_dispatch') || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) | |
steps: | |
- id: verify-sha-input | |
if: github.event_name == 'repository_dispatch' | |
run: | | |
echo \"${{ github.event.client_payload.pull_request.head.sha }}\" | |
echo \"${{ github.event.client_payload.slash_command.args.named.sha }}\" | |
SHAINPUT=$(echo ${{github.event.client_payload.slash_command.args.named.sha}} | cut -c1-7) | |
if [ ${#SHAINPUT} -le 6 ]; then echo "error::input sha not at least 7 characters long" ; exit 1 | |
else echo "done" | |
fi | |
SHAHEAD=$(echo ${{github.event.client_payload.pull_request.head.sha}} | cut -c1-7) | |
echo ${#SHAINPUT} | |
echo ${#SHAHEAD} | |
if [ "${SHAHEAD}" != "${SHAINPUT}" ]; then echo "sha input from slash command does not equal the head sha" ; exit 1 | |
else echo "shas are equal" | |
fi | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version-file: ./go.mod | |
cache: false | |
- name: Install dependencies | |
run: make tools | |
- name: Create and populate .snowflake/config file | |
run: mkdir $HOME/.snowflake && echo "${{ secrets.SNOWFLAKE_CONFIG_FILE }}" > $HOME/.snowflake/config | |
- run: make test |