@@ -13,35 +13,40 @@ jobs:
1313
1414    runs-on : ubuntu-latest 
1515    steps :
16-       - uses : actions/checkout@v2 
17- 
1816      - uses : actions/setup-node@v2 
1917        with :
2018          node-version : 14 
2119
22-       - name : Restore node_modules 
20+       - uses : actions/checkout@v2 
21+ 
22+       #  By default, the actions/checkout@v2 only retrieves the one commit
23+       #  associated with the pull request. The benchmarks test against the
24+       #  `master` branch also, so we explicitly retrieve it here.
25+       - name : Fetch additional refs 
26+         run : git fetch --no-tags --depth=1 origin master 
27+ 
28+       - name : Restore benchmarks/node_modules 
2329        id : cache 
2430        uses : actions/cache@v2 
2531        with :
26-           path : node_modules 
27-           #  Bump the number after `lit-element-1 .x-node-modules` to force a 
28-           #  cache update. Note there are multiple  cache actions in `tests.yml` 
29-           #  that should all keep keys in sync.
30-           key : lit-element-1 .x-node-modules-0-${{ runner.os }}-${{ hashFiles('package-lock.json') }} 
32+           path : benchmarks/ node_modules
33+           #  Bump the number after `lit-element-2 .x-benchmarks- node-modules` to
34+           #  force a  cache update. Note there are cache actions in other jobs in 
35+           #  this file  that should all keep keys in sync.
36+           key : lit-element-2 .x-benchmarks- node-modules-0-${{ runner.os }}-${{ hashFiles('benchmarks/ package-lock.json') }} 
3137
3238      - name : NPM install 
3339        if : steps.cache.outputs.cache-hit != 'true' 
40+         working-directory : ./benchmarks 
3441        run : npm ci 
3542
36-       - name : Build 
37-         run : npm run build 
38- 
3943      - name : Benchmark 
44+         working-directory : ./benchmarks 
4045        run : npx tach --config tachometer.json --json-file results.json 
4146
4247      - name : Report 
4348        uses : andrewiggins/tachometer-reporter-action@v2 
4449        with :
45-           path : results.json 
50+           path : ./benchmarks/ results.json
4651          pr-bench-name : this-change 
4752          base-bench-name : master 
0 commit comments