File tree Expand file tree Collapse file tree 10 files changed +364
-20
lines changed Expand file tree Collapse file tree 10 files changed +364
-20
lines changed Original file line number Diff line number Diff line change 7474 - name : Install dependencies
7575 run : yarn install
7676
77- # Build assets
78- - run : yarn build
79- - run : npm pack
77+ - name : Compile assets bundle
78+ run : yarn build
79+ env :
80+ CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
81+
82+ - name : Pack bundle tarball
83+ run : npm pack
8084
8185 - name : Create Release
8286 id : create_release
Original file line number Diff line number Diff line change 88 steps :
99 - name : Checkout branch
1010 uses : actions/checkout@v4
11+ with :
12+ fetch-depth : 2
1113
1214 - name : Setup Node
1315 uses : actions/setup-node@v4
2527
2628 - name : Test
2729 run : yarn test
30+
31+ - name : Upload coverage to OtterWise
32+ if : ${{ !cancelled() && vars.OTTERWISE_ENABLED == 'true' }}
33+ uses : getOtterWise/github-action@v1
34+ with :
35+ token : ${{ secrets.OTTERWISE_TOKEN }}
36+
37+ - name : Upload coverage to Coveralls
38+ if : ${{ !cancelled() && vars.COVERALLS_ENABLED == 'true' }}
39+ uses : coverallsapp/github-action@v2
40+ with :
41+ # github-token: ${{ secrets.GITHUB_TOKEN }}
42+ format : lcov
43+ file : ./coverage/lcov.info
44+
45+ - name : Upload coverage to Codecov
46+ if : ${{ !cancelled() && vars.CODECOV_ENABLED == 'true' }}
47+ uses : codecov/codecov-action@v5
48+ with :
49+ token : ${{ secrets.CODECOV_TOKEN }}
50+
51+ - name : Upload test results to Codecov
52+ if : ${{ !cancelled() && vars.CODECOV_ENABLED == 'true' }}
53+ uses : codecov/test-results-action@v1
54+ with :
55+ token : ${{ secrets.CODECOV_TOKEN }}
Original file line number Diff line number Diff line change @@ -35,3 +35,4 @@ yarn-debug.log*
3535yarn-error.log *
3636* .mp4
3737/DS /.idea
38+ /junit.xml
Original file line number Diff line number Diff line change 11const path = require ( 'path' ) ;
2+ const { codecovWebpackPlugin } = require ( "@codecov/webpack-plugin" ) ;
23
34module . exports = function ( { config } ) {
5+ config . plugins = config . plugins || [ ] ;
6+ config . plugins . push (
7+ codecovWebpackPlugin ( {
8+ enableBundleAnalysis : process . env . CODECOV_TOKEN !== undefined ,
9+ bundleName : "design-system" ,
10+ uploadToken : process . env . CODECOV_TOKEN ,
11+ } ) ,
12+ ) ;
13+
414 config . module . rules . push ( {
515 test : / \. s c s s $ / ,
616 use : [
Original file line number Diff line number Diff line change 1+ coverage :
2+ status :
3+ project :
4+ default :
5+ informational : true
6+ patch :
7+ default :
8+ informational : true
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ module.exports = {
3434 // A list of reporter names that Jest uses when writing coverage reports
3535 coverageReporters : [
3636 "text" ,
37+ "lcov" ,
3738 ] ,
3839
3940 // An object that configures minimum threshold enforcement for coverage results
@@ -98,7 +99,9 @@ module.exports = {
9899 // projects: null,
99100
100101 // Use this configuration option to add custom reporters to Jest
101- // reporters: undefined,
102+ reporters : [
103+ 'jest-junit' ,
104+ ] ,
102105
103106 // Automatically reset mock state between every test
104107 // resetMocks: false,
Original file line number Diff line number Diff line change 9797 "@babel/preset-react" : " ^7.28.5" ,
9898 "@babel/preset-typescript" : " ^7.28.5" ,
9999 "@babel/runtime" : " ^7.28.4" ,
100+ "@codecov/webpack-plugin" : " ^1.9.1" ,
100101 "@eslint/compat" : " ^1.4.1" ,
101102 "@fortawesome/fontawesome-svg-core" : " ^6.7.2" ,
102103 "@fortawesome/free-brands-svg-icons" : " ^6.7.2" ,
148149 "jest" : " ^29.7.0" ,
149150 "jest-css-modules-transform" : " ^4.4.2" ,
150151 "jest-environment-jsdom" : " ^29.7.0" ,
152+ "jest-junit" : " ^16.0.0" ,
151153 "nodemon" : " ^3.1.10" ,
152154 "postcss" : " ^8.5.6" ,
153155 "prop-types" : " ^15.8.1" ,
Original file line number Diff line number Diff line change 11// Jest Snapshot v1, https://goo.gl/fbAQLP
22
3- exports [` test withToast it can create a new Toast message 1` ] = `
3+ exports [` withToast() can create a new Toast message 1` ] = `
44[
55 <div
66 className = " Alert Alert-success"
Original file line number Diff line number Diff line change @@ -16,8 +16,8 @@ function WrappedComponent() {
1616 return < div /> ;
1717}
1818
19- describe ( 'test withToast' , ( ) => {
20- test ( 'it can create a new Toast message', async ( ) => {
19+ describe ( 'withToast() ' , ( ) => {
20+ it ( ' can create a new Toast message', async ( ) => {
2121 const newMessage = 'This is just a test...' ;
2222 const ComponentWithToast = withToast ( WrappedComponent ) ;
2323 const toast = create ( < ComponentWithToast /> ) ;
You can’t perform that action at this time.
0 commit comments