Improve CI workflow

main
Anton Novojilov 3 years ago
parent 52da8f3fa5
commit 83ba807137

@ -18,7 +18,6 @@ jobs:
env: env:
SRC_DIR: src/github.com/${{ github.repository }} SRC_DIR: src/github.com/${{ github.repository }}
GO111MODULE: auto
strategy: strategy:
matrix: matrix:
@ -29,12 +28,6 @@ jobs:
uses: actions/setup-go@v3 uses: actions/setup-go@v3
with: with:
go-version: ${{ matrix.go }} go-version: ${{ matrix.go }}
id: go
- name: Setup PATH
run: |
echo "GOPATH=${{ github.workspace }}" >> "$GITHUB_ENV"
echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v3
@ -53,33 +46,29 @@ jobs:
working-directory: ${{env.SRC_DIR}} working-directory: ${{env.SRC_DIR}}
run: go test -v -covermode count -coverprofile cover.out ./... run: go test -v -covermode count -coverprofile cover.out ./...
- name: Install goveralls - name: Send coverage data
env: uses: essentialkaos/goveralls-action@v1
GO111MODULE: off
run: go get -v github.com/mattn/goveralls
- name: Send coverage to Coveralls
working-directory: ${{env.SRC_DIR}}
env: env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: goveralls -service github -coverprofile cover.out
- name: Set up Node.js
uses: actions/setup-node@v3
with: with:
node-version: '14.x' path: ${{env.SRC_DIR}}
profile: cover.out
parallel: true
flag-name: linux-${{ matrix.go }}
- name: Install codeclimate-test-reporter SendCoverage:
run: npm install -g codeclimate-test-reporter name: Send Coverage
runs-on: ubuntu-latest
- name: Send coverage to Codebeat needs: Go
working-directory: ${{env.SRC_DIR}}
steps:
- name: Finish parallel tests
uses: essentialkaos/goveralls-action@v1
env: env:
CODECLIMATE_API_HOST: https://codebeat.co/webhooks/code_coverage COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CODECLIMATE_REPO_TOKEN: ${{ secrets.CODECLIMATE_TOKEN }} with:
run: | parallel-finished: true
sed -i 's#/v[0-9]\+/#/#g' cover.out
codeclimate-test-reporter < cover.out
Aligo: Aligo:
name: Aligo name: Aligo
@ -89,7 +78,6 @@ jobs:
env: env:
SRC_DIR: src/github.com/${{ github.repository }} SRC_DIR: src/github.com/${{ github.repository }}
GO111MODULE: auto
steps: steps:
- name: Set up Go - name: Set up Go
@ -98,12 +86,6 @@ jobs:
go-version: '1.17.x' go-version: '1.17.x'
id: go id: go
- name: Setup PATH
run: |
echo "GOPATH=${{ github.workspace }}" >> "$GITHUB_ENV"
echo "GOBIN=${{ github.workspace }}/bin" >> "$GITHUB_ENV"
echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:

Loading…
Cancel
Save