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
14 changes: 13 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
id: set-matrix
run: |
# List of all available parsers
ALL_PARSERS="redshift"
ALL_PARSERS="redshift postgresql"
# Add more parsers here as they are added to the repository
# ALL_PARSERS="redshift mysql postgresql"

Expand Down Expand Up @@ -101,3 +101,15 @@ jobs:
# sort: cut into columns by delimiter ' ' (single space) and sort by column 3 (test time in seconds) as numeric type in reverse order (largest comes first)
# awk: accumulate sum by test time in seconds
run: grep --color=never -e '--- PASS:' -e '--- FAIL:' test.log | sed 's/[:()]//g' | awk '{print $2,$3,$4}' | sort -t' ' -nk3 -r | awk '{sum += $3; print $1,$2,$3,sum"s"}'

all-tests-passed:
runs-on: ubuntu-latest
# This job needs both detect-changes and go-tests
needs: [detect-changes, go-tests]
# This condition is key:
# - Run if no files were changed (the 'go-tests' job was skipped).
# - Or run if the 'go-tests' job (the whole matrix) succeeded.
if: success() || needs.detect-changes.outputs.any_changed == 'false'
steps:
- name: Report overall status
run: echo "All required tests passed or no changes were detected."
7 changes: 7 additions & 0 deletions postgresql/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
all: build test

build:
antlr -Dlanguage=Go -package postgresql -visitor -o . PostgreSQLLexer.g4 PostgreSQLParser.g4

test:
go test -v -run TestPostgreSQLParser
Loading