Skip to content

Commit

Permalink
chore(ci): report tests (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
igor-sirotin authored Jul 6, 2024
1 parent efe7b4c commit 2023a19
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
- "main"
- "release/**"

permissions:
checks: write

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
Expand All @@ -22,7 +25,7 @@ jobs:
echo "GIT_COMMIT_SHA=${{ github.event.pull_request.head.sha }}" >> "$GITHUB_ENV"
echo "GIT_BRANCH=${GITHUB_HEAD_REF}" >> "$GITHUB_ENV"
- name: Setup Code Climate test-reporter
- name: Setup Code Climate
run: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > /tmp/cc-test-reporter
chmod +x /tmp/cc-test-reporter
Expand Down Expand Up @@ -60,11 +63,33 @@ jobs:
-covermode atomic \
-coverprofile c.out \
./...
cp c.out /tmp/test-results/coverage.out
go tool cover -html=c.out -o /tmp/test-results/coverage.html
/tmp/cc-test-reporter after-build \
--id ${{ secrets.CC_TEST_REPORTER_ID }} \
--prefix "github.com/six78/2-story-points-cli" \
--exit-code $?
- name: Report
uses: dorny/[email protected]
if: success() || failure()
with:
name: test result
path: /tmp/test-results/gotestsum-report.xml
reporter: jest-junit

- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: coverage.out
path: /tmp/test-results/coverage.out

- name: Upload coverage report page
uses: actions/upload-artifact@v4
with:
name: coverage.html
path: /tmp/test-results/coverage.html

golangci:
name: lint
runs-on: ubuntu-latest
Expand Down

0 comments on commit 2023a19

Please sign in to comment.