Skip to content

prepare code coverage #48

prepare code coverage

prepare code coverage #48

Workflow file for this run

name: Go
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.19.12
- name: Clang
run: |
apt search clang
# sudo apt-get install -f -y clang llvm
# TODO: add different clang versions
sudo apt-get install -f -y llvm-11 clang-11
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-11 2000
# view priority
sudo update-alternatives --config clang
# view version
clang --version
- name: Download
run: |
go mod download
- name: Lint
run: |
./scripts/lint.sh
- name: Build
run: |
go build -v
- name: Race test
run: |
go test -run=TestIntegrationScripts/tests/ctype.c -race -v -timeout=30m
- name: Coverage
run: |
go get -u github.com/wadey/gocovmerge
go install github.com/ory/go-acc@latest
go get -u golang.org/x/sys/unix
TRAVIS=true ./scripts/test.sh
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage.txt
#verbose: true # optional (default = false)