Skip to content

Commit

Permalink
.github/workflows/coverage.yml updated golang version and refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
fb929 committed Sep 11, 2023
1 parent 2da1d6d commit 1d01aa3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 32 deletions.
18 changes: 2 additions & 16 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
matrix:
go-version:
- 1.21.0
- '1.21'
env:
GOPRIVATE: github.com/anyproto
# redis for tests
Expand All @@ -30,25 +30,11 @@ jobs:
- uses: actions/setup-go@v4
with:
go-version: '${{ matrix.go-version }}'
check-latest: true

- name: git config
run: git config --global url.https://${{ secrets.ANYTYPE_PAT }}@github.com/.insteadOf https://github.com/

# cache {{
- id: go-cache-paths
run: |
echo "GOCACHE=$(go env GOCACHE)" >> $GITHUB_OUTPUT
echo "GOMODCACHE=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
with:
path: |
${{ steps.go-cache-paths.outputs.GOCACHE }}
${{ steps.go-cache-paths.outputs.GOMODCACHE }}
key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-${{ matrix.go-version }}-
# }}

- name: deps
run: make deps CGO_ENABLED=0

Expand Down
19 changes: 3 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
os:
- linux
go-version:
- 1.21.0
- '1.21'
include:
- arch: amd64
rpm_arch: x86_64
Expand All @@ -59,25 +59,12 @@ jobs:
- 6379:6379
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- uses: actions/setup-go@v4
with:
go-version: '${{ matrix.go-version }}'
check-latest: true
- name: git config
run: git config --global url.https://${{ secrets.ANYTYPE_PAT }}@github.com/.insteadOf https://github.com/
# cache {{
- id: go-cache-paths
run: |
echo "GOCACHE=$(go env GOCACHE)" >> $GITHUB_OUTPUT
echo "GOMODCACHE=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
with:
path: |
${{ steps.go-cache-paths.outputs.GOCACHE }}
${{ steps.go-cache-paths.outputs.GOMODCACHE }}
key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ matrix.os }}-${{ matrix.arch }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-${{ matrix.go-version }}-${{ matrix.os }}-${{ matrix.arch }}-
# }}

# build {{
- name: deps
Expand Down

0 comments on commit 1d01aa3

Please sign in to comment.