Skip to content

Commit

Permalink
chore: Add CI workflow for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
sgaunet committed Jun 30, 2024
1 parent 0e2b55c commit 8a10828
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
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 }}

0 comments on commit 8a10828

Please sign in to comment.