Skip to content

Commit

Permalink
test: use codecov/codecov-action (#93)
Browse files Browse the repository at this point in the history
Co-authored-by: afc163 <[email protected]>
  • Loading branch information
Layouwen and afc163 authored Aug 18, 2024
1 parent 684dd89 commit 5eb4583
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 31 deletions.
35 changes: 5 additions & 30 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,6 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Test

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

name: ✅ test
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
- run: npm install
- run: npm run compile
- run: npm run lint
- run: npm run coverage
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
test:
uses: react-component/rc-test/.github/workflows/test.yml@main
secrets: inherit
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
],
"scripts": {
"bench": "vitest bench",
"compile": "father build",
"coverage": "npm test -- --coverage",
"compile": "father build",
"lint": "eslint src --ext .ts",
"prepare": "tsx generate-presets",
"prepublishOnly": "npm run compile && np --no-cleanup --no-publish",
Expand Down

0 comments on commit 5eb4583

Please sign in to comment.