diff --git a/.github/workflows/auth-service-cd.yml b/.github/workflows/auth-service-cd.yml index 61dfd11..ea34324 100644 --- a/.github/workflows/auth-service-cd.yml +++ b/.github/workflows/auth-service-cd.yml @@ -1,4 +1,4 @@ -name: Release Auth service to Docker Hub and Deploy to Kubernetes +name: Release Auth service to Docker Hub on: push: diff --git a/.github/workflows/auth-service-ci.yml b/.github/workflows/auth-service-ci.yml deleted file mode 100644 index d96d428..0000000 --- a/.github/workflows/auth-service-ci.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Authentication service Continuous Integration -on: - push: - paths: - - "cmd/auth/**" - - "pkg/**" -jobs: - lint: - uses: ./.github/workflows/go_lint.yml - with: - working-directory: 'cmd/auth' - build: - needs: lint - uses: ./.github/workflows/go_build.yml - with: - working-directory: 'cmd/auth' - test: - needs: build - uses: ./.github/workflows/go_test.yml - with: - working-directory: 'cmd/auth' \ No newline at end of file diff --git a/.github/workflows/backend-cd.yml b/.github/workflows/backend-cd.yml index 6adff74..8b941e6 100644 --- a/.github/workflows/backend-cd.yml +++ b/.github/workflows/backend-cd.yml @@ -1,4 +1,4 @@ -name: Release Backend service to Docker Hub and Deploy to Kubernetes +name: Release Backend service to Docker Hub on: push: diff --git a/.github/workflows/backend-ci.yml b/.github/workflows/backend-ci.yml deleted file mode 100644 index 25ab1d4..0000000 --- a/.github/workflows/backend-ci.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Backend Continuous Integration -on: - push: - paths: - - "cmd/backend/**" - - "pkg/**" -jobs: - lint: - uses: ./.github/workflows/go_lint.yml - with: - working-directory: 'cmd/backend' - build: - needs: lint - uses: ./.github/workflows/go_build.yml - with: - working-directory: 'cmd/backend' - test: - needs: build - uses: ./.github/workflows/go_test.yml - with: - working-directory: 'cmd/backend' \ No newline at end of file diff --git a/.github/workflows/frontend-ci.yml b/.github/workflows/frontend-ci.yml index 0257c67..27aaa3b 100644 --- a/.github/workflows/frontend-ci.yml +++ b/.github/workflows/frontend-ci.yml @@ -1,6 +1,6 @@ name: Frontend Continuous Integration on: - push: + pull_request: paths: - "cmd/frontend/**" jobs: diff --git a/.github/workflows/go_build.yml b/.github/workflows/go_build.yml deleted file mode 100644 index 1c471d6..0000000 --- a/.github/workflows/go_build.yml +++ /dev/null @@ -1,27 +0,0 @@ -on: - workflow_call: - inputs: - working-directory: - required: true - type: string - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Setup Go 1.22.x' - uses: actions/setup-go@v5 - with: - go-version: '1.22.x' - - - name: Display Go version - run: go version - - - name: Install dependencies - run: | - go get - - - name: Build - run: | - go build ${{ inputs.working-directory }} \ No newline at end of file diff --git a/.github/workflows/go_lint.yml b/.github/workflows/lint.yml similarity index 61% rename from .github/workflows/go_lint.yml rename to .github/workflows/lint.yml index 287601b..b4305db 100644 --- a/.github/workflows/go_lint.yml +++ b/.github/workflows/lint.yml @@ -1,9 +1,8 @@ on: - workflow_call: - inputs: - working-directory: - required: true - type: string + pull_request: + paths: + - "cmd/**" + - "pkg/**" jobs: golangci: @@ -13,10 +12,9 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: - go-version: '1.22' + go-version: '1.23' cache: false - name: golangci-lint uses: golangci/golangci-lint-action@v4 with: version: latest - working-directory: ${{ inputs.working-directory }} \ No newline at end of file diff --git a/.github/workflows/pkg-ci.yml b/.github/workflows/pkg-ci.yml deleted file mode 100644 index 6a5eda7..0000000 --- a/.github/workflows/pkg-ci.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Common Package Continuous Integration -on: - push: - paths: - - "pkg/**" -jobs: - lint: - uses: ./.github/workflows/go_lint.yml - with: - working-directory: 'pkg' - test: - needs: lint - uses: ./.github/workflows/go_test.yml - with: - working-directory: 'pkg' \ No newline at end of file diff --git a/.github/workflows/go_test.yml b/.github/workflows/test.yml similarity index 73% rename from .github/workflows/go_test.yml rename to .github/workflows/test.yml index 2fab8bc..dcd6d32 100644 --- a/.github/workflows/go_test.yml +++ b/.github/workflows/test.yml @@ -1,9 +1,8 @@ on: - workflow_call: - inputs: - working-directory: - required: true - type: string + pull_request: + paths: + - "cmd/**" + - "pkg/**" jobs: build: @@ -24,5 +23,4 @@ jobs: - name: Run tests run: | - cd ${{ inputs.working-directory }} go test ./... \ No newline at end of file