Skip to content
This repository has been archived by the owner on Jan 21, 2025. It is now read-only.

build(deps): bump the go_modules group across 7 directories with 14 u… #64

build(deps): bump the go_modules group across 7 directories with 14 u…

build(deps): bump the go_modules group across 7 directories with 14 u… #64

name: ENGINE mongo-writer Tests
on:
push:
branches-ignore:
- "v*"
tags-ignore:
- v*
paths:
- "engine/mongo-writer/**/*"
- ".github/workflows/runtime-mongo-writer*"
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: 1.18.x
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.46.2
working-directory: ./engine/mongo-writer
args: --timeout 5m
test:
name: Tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: 1.18.x
- name: Test
run: go test ./... -cover -v -coverprofile=coverage.out
working-directory: ./engine/mongo-writer
- name: Archive code coverage results
uses: actions/upload-artifact@v3
with:
name: coverage-report
path: engine/mongo-writer/coverage.out
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Download code coverage results
uses: actions/download-artifact@v3
with:
name: coverage-report
path: engine/mongo-writer
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
with:
projectBaseDir: engine/mongo-writer
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_MONGO_WRITER }}