Fix multi-statements in nested triggers #355
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
name: Test Integration with Dolt and DoltgreSQL | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
issue_comment: | |
types: [created, edited] | |
jobs: | |
test-integration: | |
if: github.event_name == 'issue_comment' && github.event.issue.pull_request != '' || github.event_name == 'pull_request' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check for a Dolt PR link | |
id: check_dolt_pr | |
run: | | |
COMMENTS=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | |
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments) | |
COMMENT_EXISTS=$(echo "$COMMENTS" | jq -r '.[] | select(.body | contains("github.com/dolthub/dolt/pull/"))') | |
if [ -n "$COMMENT_EXISTS" ]; then | |
echo "comment_exists=true" >> $GITHUB_OUTPUT | |
else | |
echo "comment_exists=false" >> $GITHUB_OUTPUT | |
fi | |
- name: Check for a DoltgreSQL PR link | |
id: check_doltgresql_pr | |
run: | | |
COMMENTS=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | |
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments) | |
COMMENT_EXISTS=$(echo "$COMMENTS" | jq -r '.[] | select(.body | contains("github.com/dolthub/doltgresql/pull/"))') | |
if [ -n "$COMMENT_EXISTS" ]; then | |
echo "comment_exists=true" >> $GITHUB_OUTPUT | |
else | |
echo "comment_exists=false" >> $GITHUB_OUTPUT | |
fi | |
- name: Checkout go-mysql-server | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- name: Clone Dolt | |
if: steps.check_dolt_pr.outputs.comment_exists == 'false' | |
run: git clone https://github.com/dolthub/dolt.git | |
- name: Clone DoltgreSQL repository | |
if: steps.check_doltgresql_pr.outputs.comment_exists == 'false' | |
run: git clone https://github.com/dolthub/doltgresql.git | |
- name: Build DoltgreSQL's parser | |
if: steps.check_doltgresql_pr.outputs.comment_exists == 'false' | |
run: | | |
cd doltgresql | |
./postgres/parser/build.sh | |
- name: Test Dolt against main | |
id: test_dolt_main | |
if: steps.check_dolt_pr.outputs.comment_exists == 'false' | |
continue-on-error: true | |
run: | | |
cd dolt/go | |
go get github.com/dolthub/go-mysql-server@main | |
go mod tidy | |
cd libraries/doltcore/sqle/enginetest | |
go test ./... --count=1 | |
- name: Test DoltgreSQL against main | |
id: test_doltgresql_main | |
if: steps.check_doltgresql_pr.outputs.comment_exists == 'false' | |
continue-on-error: true | |
run: | | |
cd doltgresql | |
go get github.com/dolthub/go-mysql-server@main | |
go mod tidy | |
cd testing/go | |
go test ./... --count=1 -skip Replication | |
- name: Test Dolt against PR | |
if: steps.check_dolt_pr.outputs.comment_exists == 'false' && steps.test_dolt_main.outcome == 'success' | |
run: | | |
cd dolt/go | |
git reset --hard | |
go get github.com/${{ github.event.pull_request.head.repo.full_name }}@${{ github.event.pull_request.head.sha }} | |
go mod tidy | |
cd libraries/doltcore/sqle/enginetest | |
go test ./... --count=1 | |
- name: Test DoltgreSQL against PR | |
if: steps.check_doltgresql_pr.outputs.comment_exists == 'false' && steps.test_doltgresql_main.outcome == 'success' | |
run: | | |
cd doltgresql | |
git reset --hard | |
go get github.com/${{ github.event.pull_request.head.repo.full_name }}@${{ github.event.pull_request.head.sha }} | |
go mod tidy | |
cd testing/go | |
go test ./... --count=1 -skip Replication |