Skip to content

Commit

Permalink
buid: upgrade workflow dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
ravisuhag committed Jul 1, 2023
1 parent e7b1961 commit 5e119fb
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 49 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
name: Lint
on: [ push, pull_request, workflow_dispatch ]

on: [push]

jobs:
golangci-lint:
golangci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-go@v4
with:
go-version: 1.18
go-version: "1.20"
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
uses: golangci/golangci-lint-action@v3
with:
skip-go-installation: true
version: v1.50.1
args: --timeout=10m
version: v1.53
args: --timeout=5m
39 changes: 10 additions & 29 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,50 +3,31 @@ name: Release
on:
push:
tags:
- 'v*'
- "v*"

jobs:
release:
goreleaser:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:13
ports:
- 5432:5432
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: 1.18
id: go
- name: Check out code into the Go module directory
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Test
env:
POSTGRES_PASSWORD: postgres
run: make test
- name: Get release tag
id: get_version
uses: battila7/get-version-action@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: "1.20"
- name: Login to DockerHub
uses: docker/login-action@v1
with:
registry: docker.io
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2.6.1
uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser
version: latest
args: --rm-dist
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GO_RELEASER_TOKEN }}
20 changes: 9 additions & 11 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

name: Test
on: [push, pull_request]

Expand All @@ -18,13 +17,10 @@ jobs:
--health-timeout 5s
--health-retries 5
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Set up Go 1.18
uses: actions/setup-go@v2
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: 1.18
id: go
go-version: "1.20"
- name: Install dependencies
run: sudo apt-get install build-essential
- name: Install packages
Expand All @@ -33,7 +29,9 @@ jobs:
env:
POSTGRES_PASSWORD: postgres
run: make test
- name: Send coverage to coveralls
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: coverage.out
- name: Install goveralls and send coverage
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
go install github.com/mattn/goveralls@latest
goveralls -coverprofile=coverage.out -service=github

0 comments on commit 5e119fb

Please sign in to comment.