-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from inoas/release/v1.1.0
Release/v1.1.0
- Loading branch information
Showing
43 changed files
with
993 additions
and
18 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
.github/sh/create-database-gleam_cake_pog_test-postgres.sh
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env sh | ||
|
||
set -eu | ||
|
||
psql <<SQL | ||
SELECT 'CREATE DATABASE gleam_cake_pog_test' | ||
WHERE NOT EXISTS ( | ||
SELECT FROM pg_database WHERE datname = 'gleam_cake_pog_test' | ||
)\\gexec | ||
SQL |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
name: Test | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
gleam_version: | ||
type: string | ||
required: true | ||
default: "1.6" | ||
erlang_version: | ||
type: string | ||
default: "26" | ||
test_erlang: | ||
type: boolean | ||
default: true | ||
test_node: | ||
type: boolean | ||
default: true | ||
|
||
jobs: | ||
format: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: inoas/gleam_actions/.github/actions/install_gleam@main-on-upstream | ||
with: | ||
gleam_version: ${{inputs.gleam_version}} | ||
erlang_version: ${{inputs.erlang_version}} | ||
- uses: inoas/gleam_actions/.github/actions/format@main-on-upstream | ||
|
||
deps: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: inoas/gleam_actions/.github/actions/install_gleam@main-on-upstream | ||
with: | ||
gleam_version: ${{ inputs.gleam_version }} | ||
erlang_version: ${{ inputs.erlang_version }} | ||
- uses: inoas/gleam_actions/.github/actions/deps_cache@main-on-upstream | ||
with: | ||
gleam_version: ${{ inputs.gleam_version }} | ||
|
||
test_erlang: | ||
if: inputs.test_erlang | ||
runs-on: ubuntu-latest | ||
services: | ||
postgres: | ||
image: postgres:latest | ||
env: | ||
POSTGRES_PASSWORD: postgres | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
ports: | ||
- 5432:5432 | ||
needs: deps | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
erlang: | ||
- ${{inputs.erlang_version}} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: inoas/gleam_actions/.github/actions/install_gleam@main-on-upstream | ||
with: | ||
gleam_version: ${{ inputs.gleam_version }} | ||
erlang_version: ${{ matrix.erlang }} | ||
- run: ./.github/sh/create-database-gleam_cake_pog_test-postgres.sh | ||
env: | ||
PGHOST: localhost | ||
PGPORT: 5432 | ||
PGPASSWORD: postgres | ||
PGUSER: postgres | ||
- uses: inoas/gleam_actions/.github/actions/test@main-on-upstream | ||
with: | ||
target: "erlang" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
workflow_call: | ||
|
||
jobs: | ||
test_lowest: | ||
uses: ./.github/workflows/abstract_test.yml | ||
with: | ||
erlang_version: "26" | ||
gleam_version: "1.6.3" | ||
test_erlang: true | ||
test_node: false | ||
test_highest: | ||
uses: ./.github/workflows/abstract_test.yml | ||
with: | ||
erlang_version: "27" | ||
gleam_version: "1.7.0" | ||
test_erlang: true | ||
test_node: false |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,6 @@ | |
*.ez | ||
/build | ||
erl_crash.dump | ||
|
||
/docker/data/* | ||
!/docker/data/.gitkeep |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# erlang 26.2.5.6 | ||
# gleam 1.6.3 | ||
erlang 27.2 | ||
gleam 1.7.0 | ||
# gleam nightly |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env bash | ||
|
||
gleam test >/dev/null 2>&1 | ||
gleam run --module birdie accept-all |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env bash | ||
|
||
gleam test >/dev/null 2>&1 | ||
gleam run --module birdie review |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env bash | ||
|
||
gleam test >/dev/null 2>&1 | ||
gleam run --module birdie reject-all |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Go to the root of the project | ||
cd "$(dirname "$0")" && cd .. | ||
|
||
cloc ./bin ./birdie_snapshots ./src ./test |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Go to the root of the project | ||
cd "$(dirname "$0")" && cd ../.. | ||
|
||
docker compose down | ||
docker rm gleam-cake-test-postgres --force --volumes 2>/dev/null | ||
docker rm gleam-cake-test-mariadb --force --volumes 2>/dev/null | ||
rm -rf docker/data/* | ||
touch docker/data/.keep | ||
docker compose up --remove-orphans |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Go to the root of the project | ||
cd "$(dirname "$0")" && cd ../.. | ||
|
||
docker compose down | ||
docker rm gleam-cake-test-postgres --force --volumes 2>/dev/null | ||
docker rm gleam-cake-test-mariadb --force --volumes 2>/dev/null | ||
rm -rf docker/data/* | ||
touch docker/data/.keep | ||
docker compose up --remove-orphans --detach |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Go to the root of the project | ||
cd "$(dirname "$0")" && cd ../.. | ||
|
||
docker compose down | ||
rm -rf postgres-data | ||
rm -rf docker/data/postgres/pgdata |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Go to the root of the project | ||
cd "$(dirname "$0")" && cd .. | ||
|
||
rg 'pub fn' --count --sort-files src |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Go to the root of the project | ||
cd "$(dirname "$0")" && cd .. | ||
|
||
gleam test |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
version: 1.2.5 | ||
title: delete_execution_result_test | ||
file: ./test/cake_test/delete_test.gleam | ||
test_name: delete_execution_result_test | ||
--- | ||
Ok([]) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
version: 1.2.5 | ||
title: delete_prepared_statement_test | ||
file: ./test/cake_test/delete_test.gleam | ||
test_name: delete_prepared_statement_test | ||
--- | ||
PreparedStatement( | ||
"$", | ||
"DELETE FROM owners USING cats INNER JOIN dogs AS dogs ON dogs.name = cats.name WHERE owners.name = $1 AND cats.owner_id = owners.id RETURNING owners.id", | ||
[StringParam("Alice")], | ||
1, | ||
Postgres, | ||
) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
version: 1.2.5 | ||
title: delete_test | ||
file: ./test/cake_test/delete_test.gleam | ||
test_name: delete_test | ||
--- | ||
DeleteQuery(Delete( | ||
NoDeleteModifier, | ||
DeleteTable("owners"), | ||
DeleteUsing([FromTable("cats")]), | ||
Joins([ | ||
InnerJoin( | ||
JoinTable("dogs"), | ||
"dogs", | ||
WhereComparison( | ||
WhereColumnValue("dogs.name"), | ||
Equal, | ||
WhereColumnValue("cats.name"), | ||
), | ||
), | ||
]), | ||
AndWhere([ | ||
WhereComparison( | ||
WhereColumnValue("owners.name"), | ||
Equal, | ||
WhereParamValue(StringParam("Alice")), | ||
), | ||
WhereComparison( | ||
WhereColumnValue("cats.owner_id"), | ||
Equal, | ||
WhereColumnValue("owners.id"), | ||
), | ||
]), | ||
Returning(["owners.id"]), | ||
NoEpilog, | ||
NoComment, | ||
)) |
7 changes: 7 additions & 0 deletions
7
birdie_snapshots/insert_values_execution_result_test.accepted
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
version: 1.2.5 | ||
title: insert_values_execution_result_test | ||
file: ./test/cake_test/insert_values_test.gleam | ||
test_name: insert_values_execution_result_test | ||
--- | ||
Ok([#("Whiskers")]) |
17 changes: 17 additions & 0 deletions
17
birdie_snapshots/insert_values_prepared_statement_test.accepted
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
version: 1.2.5 | ||
title: insert_values_prepared_statement_test | ||
file: ./test/cake_test/insert_values_test.gleam | ||
test_name: insert_values_prepared_statement_test | ||
--- | ||
PreparedStatement( | ||
"$", | ||
"INSERT INTO cats (name, rating, age) VALUES ($1, $2, $3) RETURNING name", | ||
[ | ||
StringParam("Whiskers"), | ||
FloatParam(3.14), | ||
IntParam(42), | ||
], | ||
3, | ||
Postgres, | ||
) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
version: 1.2.5 | ||
title: insert_values_test | ||
file: ./test/cake_test/insert_values_test.gleam | ||
test_name: insert_values_test | ||
--- | ||
InsertQuery(Insert( | ||
InsertIntoTable("cats"), | ||
InsertColumns([ | ||
"name", | ||
"rating", | ||
"age", | ||
]), | ||
NoInsertModifier, | ||
InsertSourceRows([ | ||
InsertRow([ | ||
InsertParam(StringParam("Whiskers")), | ||
InsertParam(FloatParam(3.14)), | ||
InsertParam(IntParam(42)), | ||
]), | ||
]), | ||
InsertConflictError, | ||
Returning(["name"]), | ||
NoEpilog, | ||
NoComment, | ||
)) |
7 changes: 7 additions & 0 deletions
7
birdie_snapshots/select_distinct_execution_result_test.accepted
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
version: 1.2.5 | ||
title: select_distinct_execution_result_test | ||
file: ./test/cake_test/select_test.gleam | ||
test_name: select_distinct_execution_result_test | ||
--- | ||
Ok([False, True, Null]) |
13 changes: 13 additions & 0 deletions
13
birdie_snapshots/select_distinct_prepared_statement_test.accepted
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
version: 1.2.5 | ||
title: select_distinct_prepared_statement_test | ||
file: ./test/cake_test/select_test.gleam | ||
test_name: select_distinct_prepared_statement_test | ||
--- | ||
PreparedStatement( | ||
"$", | ||
"SELECT DISTINCT is_wild FROM cats ORDER BY is_wild ASC", | ||
[], | ||
0, | ||
Postgres, | ||
) |
Oops, something went wrong.