Skip to content

Commit

Permalink
update ci
Browse files Browse the repository at this point in the history
  • Loading branch information
cornelk committed Jun 26, 2024
1 parent 911d1f1 commit 5cfeb2e
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 10 deletions.
9 changes: 9 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
coverage:
status:
project:
default:
target: 25%
threshold: 5%
patch:
default:
informational: true
42 changes: 42 additions & 0 deletions .github/workflows/codecov.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: codecov

on:
push:
branches:
- main
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review

jobs:
codecov:
timeout-minutes: 15

name: Coverage
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v4
with:
go-version: "1.21"
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Get dependencies
run: go version && go mod download

- name: Run tests with coverage
run: make test-coverage

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./.testCoverage
15 changes: 5 additions & 10 deletions .github/workflows/go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,17 @@ on:
branches:
- main
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review

jobs:
build:
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft || !contains(github.event.commits[0].message, '[skip ci]') }}
if: "!contains(github.event.commits[0].message, '[skip ci]')"
timeout-minutes: 15

name: Build
runs-on: ubuntu-latest
strategy:
matrix:
go: [ "1.21" ]
go: ['1.21']

services:
pulsar:
Expand All @@ -31,19 +26,19 @@ jobs:

steps:
- name: Set up Go 1.x
uses: actions/setup-go@v4
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v4
uses: actions/checkout@v3

- name: Install linters
run: make install-linters

- name: Get dependencies
run: go version && go mod download
run: go mod download

# sleep to make sure that pulsar container is ready
- name: Run tests
Expand Down

0 comments on commit 5cfeb2e

Please sign in to comment.