Skip to content

Commit

Permalink
init (#512)
Browse files Browse the repository at this point in the history
* update coverage test
  • Loading branch information
Konstantin8105 authored May 29, 2024
1 parent 49936b7 commit f335d91
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 21 deletions.
38 changes: 22 additions & 16 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: 1.19.12
go-version: 1.22.3

- name: Clang
run: |
Expand All @@ -30,27 +30,33 @@ jobs:
# 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 get -u github.com/Konstantin8105/cs
go get -u golang.org/x/sys/unix
TRAVIS=true ./scripts/test.sh
# TRAVIS=true go test -v -timeout=2h
go test -run=TestIntegrationScripts/tests/ctype.c -coverprofile=coverage.txt -covermode=atomic
# TRAVIS=true ./scripts/test.sh
- name: Upload coverage to Codecov
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: include_cov=coverage.txt bash <(curl -s https://codecov.io/bash)

- name: Build
run: |
go mod download
go build -v
- name: Race test
run: go test --run=TestIntegrationScripts/tests/ctype.c -race -v -timeout=30m
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_ORG_TOKEN }}
verbose: true # optional (default = false)
file: coverage.txt
14 changes: 9 additions & 5 deletions scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,13 @@ if [ $COVERAGE_FILES != 0 ]; then
fi
fi

echo "End of coverage"
# echo "" > coverage.out
# for d in $(go list ./... | grep -v vendor); do
# go test -v -race -coverprofile=profile.out -covermode=atomic $d
# if [ -f profile.out ]; then
# cat profile.out >> coverage.out
# rm profile.out
# fi
# done

# check race
go test \
-run=TestIntegrationScripts/tests/ctype.c \
-race -v
echo "End of coverage"

0 comments on commit f335d91

Please sign in to comment.