Skip to content

Feat/gcp-filesystem (#4) #7

Feat/gcp-filesystem (#4)

Feat/gcp-filesystem (#4) #7

Workflow file for this run

name: build
on: [push]
jobs:
test-and-coverage:
name: Test and Upload Coverage to Codacy
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '^1.21' # Set the Go version as per your project requirement
- name: Test and Generate Coverage Report
run: |
mkdir -p .coverage
if ! go test -v -coverprofile=.coverage/cover.out ./...; then
echo "Test failed."
exit 1
fi
- name: Codacy Coverage Reporter
if: success()
env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
run: |
bash <(curl -Ls https://coverage.codacy.com/get.sh) report --force-coverage-parser go -r .coverage/cover.out