diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index c6c2b23..f2eeeec 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -10,19 +10,29 @@ on: branches: [ "master" ] jobs: - build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.21.3' - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version: '1.21.3' + - name: Build + run: go build ./cmd/formify/main.go - - name: Build - run: go build ./cmd/formify/main.go + - name: Start PostgreSQL + run: | + docker run -d \ + --name postgres \ + -e POSTGRES_DB=formify_dev \ + -e POSTGRES_USER=saad \ + -e POSTGRES_PASSWORD=password \ + -p 5432:5432 \ + postgres - - name: Test - run: go test -v ./tests/... + - name: Test + run: go test -v ./tests/...