Skip to content

Commit

Permalink
Merge pull request #1 from radiofrance/setup-githubactions
Browse files Browse the repository at this point in the history
ci: setup github actions
  • Loading branch information
julienvey authored Dec 20, 2021
2 parents df406af + c0a0ec2 commit 078a9c5
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 1 deletion.
28 changes: 28 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Go

on:
pull_request:
push:
tags:
- '*'

jobs:
lint:
name: Go lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # renovate: tag=v2.4.0
- uses: golangci/golangci-lint-action@5c56cd6c9dc07901af25baab6f2b0d9f3b7c3018 # renovate: tag=v2.5.2
with:
version: latest

test:
name: Go test & coverage
needs: [lint]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # renovate: tag=v2.4.0
- uses: actions/setup-go@331ce1d993939866bb63c32c6cbbfd48fa76fc57 # renovate: tag=v2.1.4
with:
go-version: 1.17.x
- run: go test -race -v ./...
27 changes: 27 additions & 0 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: goreleaser

on:
push:
tags:
- '*'

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
distribution: goreleaser
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion graphviz/graphviz_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func Test_GenerateDotviz(t *testing.T) {

content, err := ioutil.ReadFile(dotFile)
require.NoError(t, err)
assert.Len(t, content, 627)
assert.Len(t, content, 647)
assert.Contains(t, string(content),
"\"eu.gcr.io/my-test-repository/bullseye\" [fillcolor=white style=filled];")
assert.Contains(t, string(content),
Expand Down

0 comments on commit 078a9c5

Please sign in to comment.