chore(deps): update codecov/codecov-action action to v5 #805
This file contains 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: Main | |
on: | |
push: | |
branches: | |
- master | |
- 'push-action/**' | |
pull_request: | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup Go Env | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '^1.19' | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Setup golangci-lint | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
working-directory: core | |
args: --verbose | |
test: | |
needs: lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Setup Go Env | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '^1.19' | |
- name: Setup Caches | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cache/go-build | |
~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Run Core Unit Tests And Generate Coverage Report | |
run: | | |
mkdir -p ./build/core/test | |
go test github.com/logto-io/go/core -coverprofile=./build/core/test/coverage.out -covermode=atomic -gcflags=all=-l | |
- name: Run Client Unit Tests And Generate Coverage Report | |
run: | | |
mkdir -p ./build/client/test | |
go test github.com/logto-io/go/client -coverprofile=./build/client/test/coverage.out -covermode=atomic -gcflags=all=-l | |
- name: Upload Core Coverage Report | |
uses: codecov/codecov-action@v5 | |
with: | |
flags: core | |
file: ./build/core/test/coverage.out | |
- name: Upload Client Coverage Report | |
uses: codecov/codecov-action@v5 | |
with: | |
flags: client | |
file: ./build/client/test/coverage.out |