1
0
mirror of https://github.com/barthuijgen/factorio-sites.git synced 2025-01-09 14:45:40 +02:00

Add cache to yarn install in actions

This commit is contained in:
Bart 2021-03-11 10:49:50 +01:00
parent 82414ff00f
commit ab9d3b034b

View File

@ -1,13 +1,6 @@
name: Nx validate CI
name: Validate
on:
push:
branches:
- master
- dev
pull_request:
branches:
- "*"
on: pull_request
jobs:
validate:
@ -16,8 +9,18 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "14"
- run: yarn
node-version: "14.x"
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn --prefer-offline
- run: yarn db-gen
- run: yarn nx lint
- run: yarn nx test