Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #60
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# PR's only | |
name: Validate | |
on: | |
pull_request: | |
branches: [master] | |
env: | |
FORCE_COLOR: 1 | |
jobs: | |
lintAndFormatting: | |
name: Lint & Formatting | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
with: | |
# Workaround unexplained "no merge base" error | |
# https://github.com/serverless/enterprise-plugin/pull/466/checks?check_run_id=954633250 | |
fetch-depth: 2 | |
- name: Retrieve last master commit (for `git diff` purposes) | |
run: | | |
git checkout -b pr | |
git fetch --prune --depth=1 origin +refs/heads/master:refs/remotes/origin/master | |
git checkout master | |
git checkout pr | |
- name: Retrieve ~/.npm from cache | |
uses: actions/cache@v1 | |
with: | |
path: ~/.npm | |
key: npm-v14-${{ runner.os }}-${{ github.ref }}-${{ hashFiles('**package*.json') }} | |
restore-keys: | | |
npm-v14-${{ runner.os }}-${{ github.ref }}- | |
npm-v14-${{ runner.os }}-refs/heads/master- | |
- name: Retrieve node_modules from cache | |
id: cacheNodeModules | |
uses: actions/cache@v1 | |
with: | |
path: node_modules | |
key: node-modules-v14-${{ runner.os }}-${{ github.ref }}-${{ hashFiles('package.json') }} | |
restore-keys: | | |
node-modules-v14-${{ runner.os }}-${{ github.ref }}- | |
node-modules-v14-${{ runner.os }}-refs/heads/master- | |
- name: Retrieve src/node_modules from cache | |
id: cacheSrcNodeModules | |
uses: actions/cache@v1 | |
with: | |
path: src/node_modules | |
key: src/node-modules-v14-${{ runner.os }}-${{ github.ref }}-${{ hashFiles('src/package*.json') }} | |
restore-keys: | | |
src/node-modules-v14-${{ runner.os }}-${{ github.ref }}- | |
src/node-modules-v14-${{ runner.os }}-refs/heads/master- | |
- name: Retrieve src/_express/node_modules from cache | |
id: cacheSrcExpressNodeModules | |
uses: actions/cache@v1 | |
with: | |
path: src/_express/node_modules | |
key: src/_express/node-modules-v14-${{ runner.os }}-${{ github.ref }}-${{ hashFiles('src/_express/package*.json') }} | |
restore-keys: | | |
src/_express/node-modules-v14-${{ runner.os }}-${{ github.ref }}- | |
src/_express/node-modules-v14-${{ runner.os }}-refs/heads/master- | |
- name: Retrieve src/_src/node_modules from cache | |
id: cacheSrcSrcNodeModules | |
uses: actions/cache@v1 | |
with: | |
path: src/_src/node_modules | |
key: src/_src/node-modules-v14-${{ runner.os }}-${{ github.ref }}-${{ hashFiles('src/_src/package*.json') }} | |
restore-keys: | | |
src/_src/node-modules-v14-${{ runner.os }}-${{ github.ref }}- | |
src/_src/node-modules-v14-${{ runner.os }}-refs/heads/master- | |
- name: Retrieve test/src/node_modules from cache | |
id: cacheTestSrcNodeModules | |
uses: actions/cache@v1 | |
with: | |
path: test/src/node_modules | |
key: test/src/node-modules-v14-${{ runner.os }}-${{ github.ref }}-${{ hashFiles('test/src/package.json') }} | |
restore-keys: | | |
test/src/node-modules-v14-${{ runner.os }}-${{ github.ref }}- | |
test/src/node-modules-v14-${{ runner.os }}-refs/heads/master- | |
- name: Install Node.js and npm | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 14.x | |
- name: Install root dependencies | |
if: steps.cacheNodeModules.outputs.cache-hit != 'true' | |
run: npm update --save-dev --no-save | |
- name: Install src dependencies | |
if: steps.cacheSrcNodeModules.outputs.cache-hit != 'true' | |
run: | | |
cd src | |
npm ci | |
- name: Install src/_express dependencies | |
if: steps.cacheSrcExpressNodeModules.outputs.cache-hit != 'true' | |
run: | | |
cd src/_express | |
npm ci | |
- name: Install src/_src dependencies | |
if: steps.cacheSrcSrcNodeModules.outputs.cache-hit != 'true' | |
run: | | |
cd src/_src | |
npm ci | |
- name: Install test/src dependencies | |
if: steps.cacheTestSrcNodeModules.outputs.cache-hit != 'true' | |
run: | | |
cd test/src | |
npm update --no-save | |
- name: Validate Formatting | |
run: npm run prettier-check:updated | |
- name: Validate Lint rules | |
run: npm run lint:updated |