Skip to content

Commit

Permalink
Merge pull request #4 from isd-sgcu/fix/remove-unused-model
Browse files Browse the repository at this point in the history
fix: remove user model
  • Loading branch information
macgeargear authored Jun 28, 2024
2 parents 6bfb3ce + 8651040 commit 7181566
Show file tree
Hide file tree
Showing 6 changed files with 126 additions and 23 deletions.
13 changes: 13 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## Change made

- [ ]  New features
- [ ]  Bug fixes
- [ ]  Breaking changes
## Describe what you have done
-
### New Features
-
### Fix
-
### Others
-
43 changes: 43 additions & 0 deletions .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build

on:
workflow_dispatch:
push:
branches:
- main
- dev
tags:
- v*

env:
IMAGE_NAME: ghcr.io/${{ github.repository }}

jobs:
build:
name: Build
runs-on: ubuntu-latest

permissions:
contents: read
packages: write

steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Log in to the Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}

- name: Build and Push Docker Image
uses: docker/build-push-action@v3
with:
push: true
tags: ${{ env.IMAGE_NAME }}:${{ github.ref_type == 'tag' && github.ref_name || github.sha }}
cache-from: type=registry,ref=${{ env.IMAGE_NAME }}:buildcache
cache-to: type=registry,ref=${{ env.IMAGE_NAME }}:buildcache,mode=max

# docker pull --platform linux/x86_64
38 changes: 38 additions & 0 deletions .github/workflows/run-unit-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: 'Pull request/Push: Run unit test'

on:
pull_request:
branches:
- dev
- master
- main
- beta
push:
branches:
- dev
- master
- main
- beta

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.22

- name: Download dependencies
run: go mod download

- name: Vet
run: |
go vet ./...
- name: Test
run: |
go test -v -coverpkg ./internal/... -coverprofile coverage.out -covermode count ./internal/...
go tool cover -func="./coverage.out"
32 changes: 32 additions & 0 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Lint

on:
push:
branches:
- main
- dev
tags:
- v*
pull_request:

permissions:
contents: read

concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '1.22.4'
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.55
22 changes: 0 additions & 22 deletions internal/user/user.repository.go

This file was deleted.

1 change: 0 additions & 1 deletion internal/user/user.service.go

This file was deleted.

0 comments on commit 7181566

Please sign in to comment.