Skip to content

Commit

Permalink
chore: upgrade go and tools (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
powerman authored Oct 21, 2024
1 parent ebe005e commit e013622
Show file tree
Hide file tree
Showing 15 changed files with 265 additions and 2,100 deletions.
4 changes: 2 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ updates:
schedule:
interval: 'daily'
commit-message:
prefix: 'chore(ci):'
prefix: 'chore(ci)'
- package-ecosystem: 'gomod'
directory: '/'
schedule:
interval: 'daily'
commit-message:
prefix: 'chore(deps):'
prefix: 'chore(deps)'
open-pull-requests-limit: 10
48 changes: 28 additions & 20 deletions .github/workflows/CI&CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,45 +2,53 @@ name: CI/CD

on:
push:
branches: master
tags: v*
tags: [v*]
branches: [master]
pull_request:
branches: master

env:
GO_VERSION: '^1.19'
branches: [master]

jobs:

test:
runs-on: 'ubuntu-latest'
timeout-minutes: 30
strategy:
matrix:
go:
- 'stable' # Also used for goveralls.
- 'oldstable'
- '^1.19'

steps:
- uses: actions/setup-go@v3
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
go-version: ${{ matrix.go }}
check-latest: true
cache: false

- uses: actions/checkout@v3
- run: go version

- uses: actions/cache@v3
- uses: actions/cache@v4
id: cache-go-with-tools
with:
path: |
~/go/bin
~/go/pkg
~/go/src
~/go/pkg/mod
~/.cache/go-build
~/.cache/golangci-lint
.buildcache
key: v4-test-${{ runner.os }}-${{ hashFiles('go.mod') }}
key: v1-go-with-tools-${{ runner.os }}-${{ matrix.go }}-${{ hashFiles('tools.go') }}-${{ hashFiles('go.sum') }}
restore-keys: |
v4-test-${{ runner.os }}-
v1-go-with-tools-${{ runner.os }}-${{ matrix.go }}-${{ hashFiles('tools.go') }}-
v1-go-with-tools-${{ runner.os }}-${{ matrix.go }}-
- run: go generate
- run: .buildcache/bin/golangci-lint run
- run: go test -race ./...
- run: scripts/test

- name: Report code coverage
env:
COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
if: env.COVERALLS_TOKEN
run: .buildcache/bin/goveralls -service=GitHub
if: env.COVERALLS_TOKEN && matrix.go == 'stable'
run: |-
scripts/cover
.buildcache/bin/goveralls -coverprofile=.buildcache/cover.out -service=GitHub
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Create GitHub Release
name: Create GitHub release

on:
push:
tags: v*
tags: [v*]

jobs:

Expand All @@ -11,15 +11,15 @@ jobs:
timeout-minutes: 3
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Generate changelog
id: changelog
uses: metcalfc/changelog-generator@v3.0.0
uses: metcalfc/changelog-generator@v4
with:
myToken: ${{ secrets.GITHUB_TOKEN }}

- name: Create Release
- name: Create release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/Lint-PR-name.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ name: Lint PR name

on:
pull_request:
branches: master
types: [ opened, edited, synchronize, reopened ]
branches: [master]
types: [opened, edited, synchronize, reopened]

jobs:

lint-PR-name:
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install Dependencies
run: npm install @commitlint/config-conventional
- name: Install dependencies
run: npm install @commitlint/config-conventional@16.0.0

- uses: JulienKode/pull-request-name-linter-action@v0.5.0
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/Update-Go-doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Update Go module doc

on:
push:
tags: v*
tags: [v*]

jobs:

Expand All @@ -11,4 +11,4 @@ jobs:
timeout-minutes: 3
steps:
- name: Pull new module version
uses: andrewslotin/go-proxy-pull-action@master
uses: andrewslotin/go-proxy-pull-action@v1
62 changes: 0 additions & 62 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@
# na/**/me - exclude path (* doesn't match /) to file/dir "na/me", "na/*/me", "na/*/*/me", …
# !name - include previously excluded path …
/.buildcache/
/cover.out
Loading

0 comments on commit e013622

Please sign in to comment.