Skip to content

Update vulnerabilities.md #1511

Update vulnerabilities.md

Update vulnerabilities.md #1511

Workflow file for this run

# This test verifies that the docker-compose.yml file is valid and that the
# containers can be started and stopped. It also verifies the database migrations.
name: Compose Migrate test
on:
workflow_call:
pull_request:
branches:
- main
jobs:
docker:
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
- name: Install ko
uses: ko-build/[email protected]
- name: Start containers
run: KO_DOCKER_REPO=ko.local make run-docker services="postgres migrate"
- name: Wait for the migrations to complete
timeout-minutes: 1
run: |
set -e
while [ "$(docker logs minder_migrate_1 | grep 'Database migration completed successfully')" = "" ]; do
sleep 1
done
- name: Check that the database contains the tables found in the migrations folder
run: |
set -e
tables=$(grep -Ri 'CREATE TABLE' database/migrations | sed -E 's/.*CREATE TABLE (IF NOT EXISTS )?(.*) \(/\2/i')
for table in $tables; do
docker exec $(docker ps -a | grep postgres | awk '{print $1}') psql -U postgres -d mediator -c "SELECT * FROM $table"
done