Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

archive repo

archive repo #424

Workflow file for this run

name: build
on:
pull_request:
push:
branches:
- master
jobs:
build:
name: Build
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: Build
run: make build
- name: Install linter and lint the code
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.23.3
export PATH=$PATH:$(go env GOPATH)/bin
golangci-lint --version
make report.lint
- name: Run the unit tests and check for race conditions
run: make report.test
- name: upload report files (for sonar scan)
uses: actions/upload-artifact@v2
with:
name: report-files
path: |
lint.out
coverage.out
test-report.out
retention-days: 1
integration-test:
name: Integration Test
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: Start the local gremlin as preparation for the integration test and run the integration tests
run: |
make infra.up
sleep 5
make test.integration
make infra.down
sonar:
if: ${{ github.event.pull_request.head.repo.full_name == 'supplyon/gremcos' }}
name: Sonar
runs-on: ubuntu-latest
needs: build
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v1
- name: Download the report files
uses: actions/download-artifact@v2
with:
name: report-files
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}