Merge pull request #26 from vinyl-linux/dependabot/go_modules/golang.… #205
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- '*' | |
tags: | |
- '*' | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: '>=1.20.0' | |
- name: Build | |
run: | | |
make -o dispatcher/dispatcher.pb.go -o dispatcher/dispatcher_grpc.pb.go | |
- name: Test | |
run: | | |
find testdata/ -type f -exec sed -i 's/jspc/runner/g' {} \; | |
make test -o dispatcher/dispatcher.pb.go -o dispatcher/dispatcher_grpc.pb.go | |
- name: gosec | |
run: | | |
go install github.com/securego/gosec/v2/cmd/gosec@latest | |
gosec . | |
- name: golangci-lint | |
run: | | |
go install github.com/golangci/golangci-lint/cmd/[email protected] | |
golangci-lint run --skip-files='.*_test.go' | |
# - name: gokart | |
# run: | | |
# go install github.com/praetorian-inc/gokart@latest | |
# gokart scan | |
sonarcloud: | |
runs-on: ubuntu-latest | |
if: ${{ github.triggering_actor != 'dependabot[bot]' }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
# Disabling shallow clone is recommended for improving relevancy of reporting | |
fetch-depth: 0 | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: '>=1.20.0' | |
- name: Test | |
run: | | |
find testdata/ -type f -exec sed -i 's/jspc/runner/g' {} \; | |
make test -o dispatcher/dispatcher.pb.go -o dispatcher/dispatcher_grpc.pb.go | |
- name: SonarCloud Scan | |
uses: sonarsource/sonarcloud-github-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |