Skip to content

Commit

Permalink
Use golangci-lint and uprade to actions/checkout@v2
Browse files Browse the repository at this point in the history
  • Loading branch information
dunglas committed Jan 16, 2020
1 parent d0b0a9e commit 8c5fd73
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 43 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cd.yml
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v1 uses: actions/checkout@v2
- name: Install Go - name: Install Go
uses: actions/setup-go@v1 uses: actions/setup-go@v1
with: with:
Expand Down
51 changes: 9 additions & 42 deletions .github/workflows/ci.yml
Expand Up @@ -9,49 +9,16 @@ env:
GO111MODULE: 'on' GO111MODULE: 'on'


jobs: jobs:
vet: lint:
name: Vet (Go ${{ matrix.go }}) name: Lint
runs-on: ubuntu-latest runs-on: ubuntu-latest
container:
image: golang:${{ matrix.go }}-alpine
strategy:
matrix:
go:
- '1.13'
fail-fast: false
steps: steps:
- name: Checkout - name: Check out code
uses: actions/checkout@v1 uses: actions/checkout@v2
- name: Install system packages - name: Lint Go Code
run: | uses: docker://golangci/golangci-lint:latest
apk add \ with:
git \ args: golangci-lint run ./...
- name: Install project dependencies
run: go get
- name: Vet
run: go vet

format:
name: Format (Go ${{ matrix.go }})
runs-on: ubuntu-latest
container:
image: golang:${{ matrix.go }}-alpine
strategy:
matrix:
go:
- '1.13'
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Install system packages
run: |
apk add \
git \
- name: Install project dependencies
run: go get
- name: Format
run: gofmt -e -d *.go


test: test:
name: Test (Go ${{ matrix.go }}) name: Test (Go ${{ matrix.go }})
Expand All @@ -65,7 +32,7 @@ jobs:
fail-fast: false fail-fast: false
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v1 uses: actions/checkout@v2
- name: Install system packages - name: Install system packages
run: | run: |
apk add \ apk add \
Expand Down

0 comments on commit 8c5fd73

Please sign in to comment.