.github/workflows/pr-test.yml
on: pull_request
name: Pull Request
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 }}