Skip to content

Commit

Permalink
add goreleaser write permission; use latest 2019 mssql image
Browse files Browse the repository at this point in the history
  • Loading branch information
KarnerTh committed Feb 12, 2025
1 parent 5884b7f commit 76c5d90
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/release_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ on:
push:
tags:
- "*"
permissions:
contents: write

jobs:
goreleaser:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- name: Prepare sqlite database
run: make prepare-sqlite
- name: Wait for docker containers to start
run: sleep 30
run: sleep 60
- name: Set up Go
uses: actions/setup-go@v5
with:
Expand Down
4 changes: 2 additions & 2 deletions test/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ services:
- ./mysql/mysql-enum-setup.sql:/docker-entrypoint-initdb.d/2.sql
- ./mysql/mysql-multiple-databases.sql:/docker-entrypoint-initdb.d/3.sql
mermerd-mssql-test-db:
image: mcr.microsoft.com/mssql/server@sha256:f54a84b8a802afdfa91a954e8ddfcec9973447ce8efec519adf593b54d49bedf
image: mcr.microsoft.com/mssql/server:2019-latest
environment:
ACCEPT_EULA: "Y"
SA_PASSWORD: "securePassword1!"
Expand All @@ -54,6 +54,6 @@ services:
- ./mssql/mssql-setup.sql:/usr/src/app/mssql-setup.sql
- ./mssql/mssql-enum-setup.sql:/usr/src/app/mssql-enum-setup.sql
- ./mssql/mssql-multiple-databases.sql:/usr/src/app/mssql-multiple-databases.sql
- ./mssql/entrypoint.sh:/usr/src/app/entrypoint.sh
- ./mssql/entrypoint_azure.sh:/usr/src/app/entrypoint.sh
working_dir: /usr/src/app
command: sh -c './entrypoint.sh & /opt/mssql/bin/sqlservr;'
10 changes: 5 additions & 5 deletions test/mssql/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# Source: https://cardano.github.io/blog/2017/11/15/mssql-docker-container
wait_time=30s
wait_time=60s
password=securePassword1!

# wait for SQL Server to come up
Expand All @@ -9,9 +9,9 @@ sleep $wait_time
echo importing data...

# run the sql scripts to create the test database
/opt/mssql-tools/bin/sqlcmd -S 0.0.0.0 -U sa -P $password -i ./mssql-setup.sql
/opt/mssql-tools/bin/sqlcmd -S 0.0.0.0 -U sa -P $password -d mermerd_test -i ./db-table-setup.sql
/opt/mssql-tools/bin/sqlcmd -S 0.0.0.0 -U sa -P $password -d mermerd_test -i ./mssql-enum-setup.sql
/opt/mssql-tools/bin/sqlcmd -S 0.0.0.0 -U sa -P $password -d mermerd_test -i ./mssql-multiple-databases.sql
/opt/mssql-tools18/bin/sqlcmd -S 0.0.0.0 -C -U sa -P $password -i ./mssql-setup.sql
/opt/mssql-tools18/bin/sqlcmd -S 0.0.0.0 -C -U sa -P $password -d mermerd_test -i ./db-table-setup.sql
/opt/mssql-tools18/bin/sqlcmd -S 0.0.0.0 -C -U sa -P $password -d mermerd_test -i ./mssql-enum-setup.sql
/opt/mssql-tools18/bin/sqlcmd -S 0.0.0.0 -C -U sa -P $password -d mermerd_test -i ./mssql-multiple-databases.sql

echo importing done
17 changes: 17 additions & 0 deletions test/mssql/entrypoint_azure.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash
# Source: https://cardano.github.io/blog/2017/11/15/mssql-docker-container
wait_time=60s
password=securePassword1!

# wait for SQL Server to come up
echo importing data will start in $wait_time...
sleep $wait_time
echo importing data...

# run the sql scripts to create the test database
/opt/mssql-tools/bin/sqlcmd -S 0.0.0.0 -U sa -P $password -i ./mssql-setup.sql
/opt/mssql-tools/bin/sqlcmd -S 0.0.0.0 -U sa -P $password -d mermerd_test -i ./db-table-setup.sql
/opt/mssql-tools/bin/sqlcmd -S 0.0.0.0 -U sa -P $password -d mermerd_test -i ./mssql-enum-setup.sql
/opt/mssql-tools/bin/sqlcmd -S 0.0.0.0 -U sa -P $password -d mermerd_test -i ./mssql-multiple-databases.sql

echo importing done

0 comments on commit 76c5d90

Please sign in to comment.