Skip to content

Commit

Permalink
Merge pull request #5 from Gorman99/dev
Browse files Browse the repository at this point in the history
fix yml file
  • Loading branch information
Gorman99 authored Sep 21, 2022
2 parents 84f4807 + 0835814 commit 9036d24
Showing 1 changed file with 13 additions and 23 deletions.
36 changes: 13 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,41 @@
# @format

name: ci-test

on:
"on":
push:
branches: ["main"]
branches:
- main
pull_request:
branches: ["main"]

branches:
- main
jobs:
Test:
runs-on: ubuntu-latest
services:
# Label used to access the service container
services:
postgres:
# Docker Hub image
image: postgres
# Provide the password for postgres
env:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: simple_bank
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-cmd pg_isready --health-interval 10s --health-timeout 5s
--health-retries 5
ports:
# Maps tcp port 5432 on service container to the host
- 5432:5432

- "5432:5432"
steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18

- name: Install golang migrate
run: |
curl -L https://github.com/golang-migrate/migrate/releases/download/v4.15.2/migrate.linux-arm64.tar.gz | tar xvz
sudo move migrate.linux-arm64 /usr/bin/migrate

run: >
curl -L
https://github.com/golang-migrate/migrate/releases/download/v4.15.2/migrate.linux-arm64.tar.gz
| tar xvz
sudo move migrate.linux-arm64 /usr/bin/migrate
- name: Run migration
run: make migrateup

- name: Test
run: make test

0 comments on commit 9036d24

Please sign in to comment.