File tree Expand file tree Collapse file tree 4 files changed +299
-1
lines changed Expand file tree Collapse file tree 4 files changed +299
-1
lines changed Original file line number Diff line number Diff line change 1212 steps :
1313 - uses : actions/checkout@v2
1414 with :
15- fetch-depth : 100
15+ fetch-depth : 1
1616
1717 - name : Read .nvmrc
1818 run : echo "##[set-output name=NVMRC;]$(cat .nvmrc)"
4545 yarn tsc
4646 yarn eslint
4747 yarn test:ci
48+
49+ stats :
50+ if : " ! contains(toJSON(github.event.commits.*.message), '[skip-ci]')"
51+ runs-on : ubuntu-latest
52+
53+ steps :
54+ - uses : actions/checkout@v2
55+ with :
56+ fetch-depth : 1
57+
58+ - name : Read .nvmrc
59+ run : echo "##[set-output name=NVMRC;]$(cat .nvmrc)"
60+ id : nvm
61+ - name : Use Node.js
62+ uses : actions/setup-node@v1
63+ with :
64+ node-version : ' ${{ steps.nvm.outputs.NVMRC }}'
65+ - name : Get yarn cache directory path
66+ id : yarn-cache-dir-path
67+ run : echo "::set-output name=dir::$(yarn cache dir)"
68+
69+ - uses : actions/cache@v2
70+ id : yarn-cache
71+ with :
72+ path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
73+ key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
74+ restore-keys : |
75+ ${{ runner.os }}-yarn-
76+ ${{ runner.os }}-
77+
78+ - name : Install dependencies
79+ run : yarn install --frozen-lockfile
80+
81+ - name : Copy .env
82+ run : cp .env-sample .env
83+
84+ - name : Build
85+ run : yarn build
86+ env :
87+ RELATIVE_CI_KEY : ${{ secrets.RELATIVE_CI_KEY }}
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ const withImages = require('next-images');
2525const withBundleAnalyzer = require ( '@next/bundle-analyzer' ) ( {
2626 enabled : ANALYZE === 'true' ,
2727} ) ;
28+ const { RelativeCiAgentWebpackPlugin } = require ( '@relative-ci/agent' ) ;
2829
2930const config = withBundleAnalyzer (
3031 withImages (
@@ -85,6 +86,11 @@ const config = withBundleAnalyzer(
8586 } ) ,
8687 ) ;
8788 }
89+
90+ if ( ! options . dev && ! options . isServer ) {
91+ config . plugins . push ( new RelativeCiAgentWebpackPlugin ( ) ) ;
92+ }
93+
8894 return config ;
8995 } ,
9096 basePath,
Original file line number Diff line number Diff line change 7171 "devDependencies" : {
7272 "@next/bundle-analyzer" : " 10.0.4" ,
7373 "@prisma/cli" : " 2.14.0" ,
74+ "@relative-ci/agent" : " 1.4.0" ,
7475 "@swc-node/jest" : " 1.0.3" ,
7576 "@testing-library/dom" : " 7.29.1" ,
7677 "@testing-library/jest-dom" : " 5.11.8" ,
You can’t perform that action at this time.
0 commit comments