streamdal/go-sdk

View on GitHub
.github/workflows/main-test.yml

Summary

Maintainability
Test Coverage
name: main

on:
  push:
    branches:
      - main

jobs:
  test:
    name: Run tests
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-go@v2
        with:
          go-version: '~1.19' # The Go version to download (if necessary) and use.
      - name: Install Code Climate reporter
        run: |
          sudo curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
          sudo chmod +x ./cc-test-reporter
          ./cc-test-reporter before-build
      - name: Test
        run: |
          make test/coverage
      - name: Upload coverage information
        run: |
          GIT_BRANCH="${GITHUB_HEAD_REF}" ./cc-test-reporter after-build -p github.com/streamdal/go-sdk -r ${{ secrets.CC_TEST_REPORTER_ID }}
          rm ./cc-test-reporter