kodflow/kitsune

View on GitHub
.github/workflows/all.yml

Summary

Maintainability
Test Coverage
name: All

on:
  push:
    branches:
      - 'main'
  pull_request:
    branches:
      - 'main'

jobs:
  test:
    name: Tests
    runs-on: ubuntu-latest
    steps:
      - name: Check out code
        uses: actions/checkout@v4
        with:
            fetch-depth: 0
      - name: Set up Go
        uses: actions/setup-go@v5
        with:
          go-version: 1.21
      - name: Test
        run: make tests
      - name: Upload coverage to Codecov
        uses: codecov/codecov-action@v3
        with:
          token: ${{ secrets.CODECOV_TOKEN }}
      - name: SonarCloud Scan
        uses: SonarSource/sonarcloud-github-action@master
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
        with:
          args: >
            -Dsonar.projectKey=kodflow_kitsune
            -Dsonar.organization=kodflow
            -Dsonar.host.url=https://sonarcloud.io
            -Dsonar.sources=src
            -Dsonar.exclusions=**/*.pb.go
            -Dsonar.tests=.
            -Dsonar.test.inclusions=**/*_test.go
            -Dsonar.test.exclusions=vendor/**
            -Dsonar.verbose=true