File tree Expand file tree Collapse file tree 1 file changed +19
-14
lines changed Expand file tree Collapse file tree 1 file changed +19
-14
lines changed Original file line number Diff line number Diff line change 89
89
90
90
smoke :
91
91
runs-on : ubuntu-latest
92
+ defaults :
93
+ run :
94
+ working-directory : ./pr
92
95
93
96
steps :
94
97
- uses : actions/checkout@v3
98
+ with :
99
+ path : pr
100
+
101
+ - uses : actions/checkout@v3
102
+ with :
103
+ path : base
104
+ ref : ${{ github.base_ref }}
105
+ if : github.event_name == 'pull_request'
106
+
95
107
- uses : actions/setup-node@v3
96
108
with :
97
109
node-version : " *"
@@ -100,21 +112,14 @@ jobs:
100
112
# Pre-build the base branch so we can check lib folder size changes.
101
113
# Note that github.sha points to a merge commit, meaning we're testing
102
114
# the base branch versus the base branch with the PR applied.
103
- - if : github.event_name == 'pull_request'
115
+ - name : Build base LKG
116
+ if : github.event_name == 'pull_request'
104
117
run : |
105
- if [ ! -d lib ]; then
106
- git fetch origin ${{ github.base_ref }}
107
- git checkout ${{ github.base_ref }}
108
- npm ci
109
- npx hereby lkg
110
- mkdir /tmp/lkg
111
- mv lib /tmp/lkg/
112
- git restore lib
113
- git clean -fdx lib
114
- git checkout ${{ github.sha }}
115
- rm -rf lib
116
- mv /tmp/lkg/lib .
117
- fi
118
+ npm ci
119
+ npx hereby lkg
120
+ rm -rf $GITHUB_WORKSPACE/pr/lib
121
+ mv ./lib $GITHUB_WORKSPACE/pr/
122
+ working-directory : ./base
118
123
119
124
- run : npm ci
120
125
You can’t perform that action at this time.
0 commit comments