Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: Go
on: [push]
jobs:

build:
name: Build
runs-on: ubuntu-latest
Expand Down Expand Up @@ -49,12 +49,6 @@ jobs:
dep ensure
fi

- name: Install & run golangci-lint
run: |
wget -q -O - https://github.com/golangci/golangci-lint/releases/download/v1.21.0/golangci-lint-1.21.0-linux-amd64.tar.gz | \
sudo tar xvz -C /usr/bin --strip-components=1 -f -
/usr/bin/golangci-lint run --new-from-rev 983e1d15c9877401cfff83356ca0126a313cd20d

- name: Test
run: go test -v .

Expand Down
62 changes: 62 additions & 0 deletions .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: reviewdog
on: [pull_request]
jobs:
golangci-lint:
name: runner / golangci-lint
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.13
uses: actions/setup-go@v1
with:
go-version: 1.13
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v1

- name: Install Yaml
run: |
sudo apt-get update
sudo apt-get -y install yasm

- name: Build isa-l
run: |
git clone --depth 1 --branch v2.28.0 https://github.com/intel/isa-l.git
cd isa-l
./autogen.sh
./configure --prefix=/usr
make
sudo make install
sudo ldconfig

- name: Build liberasurecode
run: |
git clone https://github.com/openstack/liberasurecode.git
cd liberasurecode
./autogen.sh
./configure --prefix=/usr
make
sudo make install
sudo ldconfig

- name: Get dependencies
run: |
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi

- name: Setup reviewdog & golangci
run: |
mkdir -p $HOME/bin && curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh| sh -s -- -b $HOME/bin
echo ::add-path::$HOME/bin
wget -q -O - https://github.com/golangci/golangci-lint/releases/download/v1.21.0/golangci-lint-1.21.0-linux-amd64.tar.gz | \
sudo tar xvz -C /usr/bin --strip-components=1 -f -

- name: Run reviewdog
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
golangci-lint run --out-format line-number ./... | reviewdog -f=golangci-lint -name="golangci" -reporter=github-pr-check -level="error"

10 changes: 5 additions & 5 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ linters:
- unparam
- unused
# To be activated
# - gosimple
# - govet
# - stylecheck
# - unconvert
# - errcheck
- gosimple
- govet
- stylecheck
- unconvert
- errcheck
enable-all: false
fast: false