feat: upgrade to version 2 and refactor API client usage #5 (#10) #8
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: build | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- '!*' # Do not execute on tags | |
jobs: | |
# test: | |
# strategy: | |
# matrix: | |
# platform: [ ubuntu-latest, macOS-latest ] | |
# golang: [ '1.21.6', '1.20.1' ] | |
# name: test/golang ${{ matrix.golang }}/${{ matrix.platform }} | |
# runs-on: ${{ matrix.platform }} | |
# steps: | |
# - uses: actions/checkout@master | |
# - uses: actions/setup-go@v5 | |
# with: | |
# go-version: ${{ matrix.golang }} | |
# - run: go version | |
# - run: go test ./... | |
coverage: | |
# needs: [ test ] | |
name: coverage | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: 1.22.4 | |
# Install test-reporter | |
- run: curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter | |
- run: chmod +x ./cc-test-reporter | |
# before build step | |
- run: ./cc-test-reporter before-build | |
# RUN TEST HERE | |
- run: go test . -coverprofile c.out | |
# after build step | |
- run: ./cc-test-reporter after-build --prefix=github.com/sgaunet/perplexity-go | |
env: | |
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} |