Don't rebuild commits in e2e

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2021-06-21 22:59:21 +02:00
parent cf79d4c72e
commit 1dfb8bca71

View file

@ -20,17 +20,20 @@ jobs:
- name: Cache build - name: Cache build
uses: actions/cache@v2.1.6 uses: actions/cache@v2.1.6
id: build-cache
with: with:
path: build path: build
key: build-${{ hashFiles('src/**') }} key: build-${{ github.sha }}
- name: Get yarn cache directory path - name: Get yarn cache directory path
id: yarn-cache-dir-path id: yarn-cache-dir-path
if: steps.build-cache.outputs.cache-hit != 'true'
run: echo "::set-output name=dir::$(yarn cache dir)" run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache yarn cache - name: Cache yarn cache
uses: actions/cache@v2 uses: actions/cache@v2
id: yarn-cache id: yarn-cache
if: steps.build-cache.outputs.cache-hit != 'true'
with: with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-16-yarn-${{ hashFiles('**/yarn.lock') }} key: ${{ runner.os }}-16-yarn-${{ hashFiles('**/yarn.lock') }}
@ -38,14 +41,17 @@ jobs:
${{ runner.os }}-yarn- ${{ runner.os }}-yarn-
- name: Set up NodeJS - name: Set up NodeJS
if: steps.build-cache.outputs.cache-hit != 'true'
uses: actions/setup-node@v2 uses: actions/setup-node@v2
with: with:
node-version: 16 node-version: 16
- name: Install dependencies - name: Install dependencies
if: steps.build-cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile --prefer-offline run: yarn install --frozen-lockfile --prefer-offline
- name: Build test production build - name: Build test production build
if: steps.build-cache.outputs.cache-hit != 'true'
run: yarn build:test run: yarn build:test
- uses: actions/upload-artifact@master - uses: actions/upload-artifact@master