pull request for quote usecase interactor test and repository mock #34
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: DockerHub Action | |
on: | |
push: | |
branches: [ "main", "stag", "dev" ] | |
pull_request: | |
branches: [ "main", "stag", "dev" ] | |
jobs: | |
build_and_push: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: 'bitnami/postgresql:14.8.0' | |
env: | |
POSTGRES_USER: testuser | |
POSTGRES_PASSWORD: testpass | |
POSTGRES_DB: iquote_fiber | |
ports: | |
- 5432:5432 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: '1.21' | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Install dependencies | |
run: make deps | |
- name: Test with Go Test | |
run: make test | |
- name: Test with Go Test with Coverage | |
run: make test-coverage | |
- name: Build docker image | |
run: make docker-build | |
- name: Push docker image to Dockerhub | |
run: make docker-push | |
- name: Logout from DockerHub | |
run: docker logout |