Skip to content

feat(realtime): disable remote unused remote reloadable check #271

feat(realtime): disable remote unused remote reloadable check

feat(realtime): disable remote unused remote reloadable check #271

Workflow file for this run

name: CI
on:
pull_request:
branches:
- main
jobs:
ci:
name: "Run CI"
strategy:
fail-fast: false
matrix:
os: ["windows-latest", "ubuntu-latest", "macOS-latest"]
go: ["1.20"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Setup go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- name: tidy
run: go mod tidy
- name: test
env:
CI: enabled
run: |
go test -v -coverprofile="coverage.out" ./...
- name: lint
uses: dominikh/staticcheck-action@v1.3.0
with:
version: "2023.1.3"
install-go: false
# cache-key: ${{ matrix.go }}
- name: cov
if: matrix.os == 'ubuntu-latest'
env:
COVERAGE_GATE: 72
run: |
totalCoverage=`go tool cover -func="coverage.out" | grep total | grep -Eo '[0-9]+\.[0-9]+'`
echo "Current test coverage : $totalCoverage %"
if (( $(echo "$totalCoverage $COVERAGE_GATE" | awk '{print ($1 >= $2)}') )); then
echo "OK"
else
echo "Test coverage is below threshold of $COVERAGE_GATE%."
echo "Failed"
exit 1
fi