diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 0000000..43fe985 --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,40 @@ +name: coverage + +on: + pull_request: + branches: [master, main] + push: + branches: [master, main] + +permissions: + contents: read + +jobs: + coverage: + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@v4 + with: + path: cli + - uses: actions/checkout@v4 + with: + repository: InstaNode-dev/common + path: common + continue-on-error: true + - uses: actions/checkout@v4 + with: + repository: InstaNode-dev/proto + path: proto + continue-on-error: true + - uses: actions/setup-go@v5 + with: + go-version-file: cli/go.mod + - name: Generate coverage + working-directory: cli + run: go test ./... -short -coverprofile=coverage.out -covermode=atomic || true + - uses: codecov/codecov-action@v4 + with: + files: cli/coverage.out + flags: cli + fail_ci_if_error: false