diff --git a/.github/workflows/docker-hub-push.yml b/.github/workflows/cd.yml similarity index 96% rename from .github/workflows/docker-hub-push.yml rename to .github/workflows/cd.yml index 3e117dc..b13df42 100644 --- a/.github/workflows/docker-hub-push.yml +++ b/.github/workflows/cd.yml @@ -1,4 +1,4 @@ -name: Docker +name: Continuous Deployment on: push: diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/ci.yml similarity index 83% rename from .github/workflows/golangci-lint.yml rename to .github/workflows/ci.yml index 54ea66b..2be16f4 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,5 @@ -name: golangci-lint +name: Countinue Integration + on: push: branches: @@ -53,4 +54,22 @@ jobs: # skip-build-cache: true # Optional: The mode to install golangci-lint. It can be 'binary' or 'goinstall'. - # install-mode: "goinstall" \ No newline at end of file + # install-mode: "goinstall" + + test: + name: Run Go tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version-file: go.mod + + - name: Build + run: go build -v ./... + + - name: Test + uses: robherley/go-test-action@v0 + diff --git a/.github/workflows/go-test.yaml b/.github/workflows/go-test.yaml deleted file mode 100644 index b318094..0000000 --- a/.github/workflows/go-test.yaml +++ /dev/null @@ -1,26 +0,0 @@ -name: go-test - -on: - push: - branches: - - master - - main - - v2/master - pull_request: - -jobs: - test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version-file: go.mod - - - name: Build - run: go build -v ./... - - - name: Test - uses: robherley/go-test-action@v0 \ No newline at end of file diff --git a/.github/workflows/semver-lable.yml b/.github/workflows/semver-lable.yml index 5e9c2bd..ba0f710 100644 --- a/.github/workflows/semver-lable.yml +++ b/.github/workflows/semver-lable.yml @@ -7,17 +7,16 @@ on: jobs: semver_tag_from_pr: + needs: [golangci, test] permissions: contents: write pull-requests: read runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - with: - fetch-depth: "0" - ssh-key: ${{ secrets.SEMVER_GITHUB_ACTION_PRIVATE }} - - name: bump semVer - uses: simontheleg/semver-tag-from-pr-action@v1.4.0 - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - repo_ssh_key: ${{ secrets.semver_github_action }} \ No newline at end of file + - uses: actions/checkout@v3 + with: + fetch-depth: "0" # we need full git-history to determine the last semVer tag + - name: bump semVer + uses: simontheleg/semver-tag-from-pr-action@v1.4.0 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file