-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: refactor the way the CI is launched
Code Climate should now be able to upload on merge It's not a problem if golangci-lint is launched after a release
- Loading branch information
Showing
2 changed files
with
12 additions
and
31 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
name: CI | ||
name: Format & Lint | ||
on: | ||
pull_request: | ||
jobs: | ||
|
@@ -23,31 +23,3 @@ jobs: | |
|
||
- name: editorconfig-checker-action | ||
uses: editorconfig-checker/action-editorconfig-checker@v2 | ||
|
||
go-lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout-action | ||
uses: actions/[email protected] | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
|
||
- name: Run tests | ||
run: go test -coverprofile=coverage.txt | ||
|
||
- name: Upload results to Codecov | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
- name: Code Climate Coverage Action | ||
uses: paambaati/codeclimate-action@v9 | ||
env: | ||
CC_TEST_REPORTER_ID: ${{ secrets.CODE_CLIMATE_REPORTER_ID }} | ||
with: | ||
coverageLocations: coverage.txt:gocov | ||
prefix: github.com/ccoveille/go-safecast | ||
|
||
- name: Launch golangci-lint | ||
uses: golangci/[email protected] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
--- | ||
name: Coverage | ||
name: Test & Coverage | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
go-lint: | ||
go-test-coverage: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout-action | ||
|
@@ -22,5 +23,13 @@ jobs: | |
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
- name: Code Climate Coverage Action | ||
uses: paambaati/codeclimate-action@v9 | ||
env: | ||
CC_TEST_REPORTER_ID: ${{ secrets.CODE_CLIMATE_REPORTER_ID }} | ||
with: | ||
coverageLocations: coverage.txt:gocov | ||
prefix: github.com/ccoveille/go-safecast | ||
|
||
- name: Launch golangci-lint | ||
uses: golangci/[email protected] |