[Bounty #524] Google Cloud (GKE) support for sifnode #10322
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Golang CI | |
| on: [pull_request] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set up Go 1.19 | |
| uses: actions/setup-go@v3 | |
| with: | |
| go-version: 1.19 | |
| - uses: actions/checkout@v3 | |
| - name: Build | |
| run: make install | |
| - name: Test | |
| run: | | |
| go test -v ./... -coverprofile=coverage.txt -covermode=atomic -coverpkg $(go list ./... | grep -v test | tr "\n" ",") | |
| excludelist="$(find ./ -type f -name '*.go' | xargs grep -l 'DONTCOVER')" | |
| for filename in ${excludelist}; do | |
| filename=$(echo $filename | sed 's/^../github.com\/Sifchain\/sifnode/g') | |
| echo "Excluding ${filename} from coverage report..." | |
| sed -i.bak "/$(echo $filename | sed 's/\//\\\//g')/d" coverage.txt | |
| done | |
| - name: Upload coverage report | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| file: ./coverage.txt | |
| verbose: true |