Skip to content

Commit

Permalink
Adding Postgres db to CI flow ( #1 )
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinayaks439 authored Dec 3, 2023
2 parents 3821832 + 7e73bb6 commit ff2fca5
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion .github/workflows/makefile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,27 @@ jobs:
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}

- name: install gomigrate.
run: |
curl -L https://packagecloud.io/golang-migrate/migrate/gpgkey | sudo apt-key add -
echo "deb https://packagecloud.io/golang-migrate/migrate/ubuntu/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/migrate.list
sudo apt-get update
sudo apt-get install -y migrate
- name: setup postgres
uses: ikalnytskyi/action-setup-postgres@v4
with:
username: root
password: secret
database: simple_bank
port: 5432
id: postgres

- name: initdb tables
run: |
unset PGSERVICEFILE
make migrateup
- name: Run tests
run: make gotest

Expand Down

0 comments on commit ff2fca5

Please sign in to comment.