Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add codecov coverage uploading #308

Merged
merged 2 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,15 @@ jobs:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- run: npm ci && npm run build
- run: npm ci
- run: npm run build
Comment on lines +16 to +17
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏

- run: npm test
- run: npm run test:gen-cov
- name: Upload coverage to CodeCov
uses: codecov/codecov-action@v4.0.1
with:
directory: ./coverage
token: ${{ secrets.CODECOV_TOKEN }}

integration_test_botToken:
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ node_modules
.DS_Store
.nyc_output
dist
coverage
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Slack Send GitHub Action

[![codecov](https://codecov.io/gh/slackapi/slack-github-action/graph/badge.svg?token=OZNX7FHN78)](https://codecov.io/gh/slackapi/slack-github-action)

Send data into Slack using this GitHub Action!

## Sending Variables
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
"scripts": {
"lint": "eslint .",
"local": "act public --eventpath .github/workflows/local/event.json --secret-file .github/workflows/local/.env --platform ubuntu-latest=node:20-buster",
"test:mocha": "nyc mocha --config .mocharc.json test/*-test.js",
"test": "npm run lint && npm run test:mocha",
"test:mocha": "mocha --config .mocharc.json test/*-test.js",
"test:gen-cov": "nyc --reporter=lcov npm run test:mocha",
"test": "npm run lint && nyc npm run test:mocha",
"build": "npx @vercel/ncc build src/index.js --license licenses.txt"
},
"repository": {
Expand Down