Skip to content

Commit

Permalink
Simplify CI
Browse files Browse the repository at this point in the history
Signed-off-by: Vladimir Popov <vladimir.popov@xored.com>
  • Loading branch information
Vladimir Popov committed Oct 1, 2020
1 parent 08f8474 commit fca38c3
Showing 1 changed file with 19 additions and 33 deletions.
52 changes: 19 additions & 33 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,56 +8,42 @@ jobs:
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v1
- name: Install yamllint
run: pip install --user yamllint
- name: Run yamllint
run: ~/.local/bin/yamllint -c .yamllint.yml --strict .
- name: yaml-lint
uses: ibiqlik/action-yamllint@v1
with:
config_file: .ci/yamllint.yml
strict: true
shellcheck:
name: shellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: shellcheck
uses: fkautz/shell-linter@v1.0.1
build:
name: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v1
with:
go-version: 1.13.4
- run: |
go build -race ./...
test:
name: test
build-and-test:
name: build and test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v1
- name: Check out code
uses: actions/checkout@v2
- name: Setup Go
uses: actions/setup-go@v1
with:
go-version: 1.13.4
- name: Install gotestsum
run: go get gotest.tools/gotestsum@v0.4.0
- name: Run tests
run: |
eval $(go env)
mkdir -p ~/junit/
${GOPATH}/bin/gotestsum --junitfile ~/junit/unit-tests.xml -- -race -short $(go list ./...)
- name: Build
run: go build -race ./...
- name: Test
run: go test -race ./...
golangci-lint:
name: golangci-lint
runs-on: ubuntu-latest
env:
GOLANGCI_LINT_CONTAINER: golangci/golangci-lint:v1.23.2
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Pull golangci-lint docker container
run: docker pull ${GOLANGCI_LINT_CONTAINER}
- name: Run golangci-lint
run: docker run --rm -v $(pwd):/app -w /app ${GOLANGCI_LINT_CONTAINER} golangci-lint run
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: v1.31
excludeFmtErrorf:
name: exclude fmt.Errorf
runs-on: ubuntu-latest
Expand Down

0 comments on commit fca38c3

Please sign in to comment.