Skip to content

fix: Updated templates to check cache for token #33

fix: Updated templates to check cache for token

fix: Updated templates to check cache for token #33

Workflow file for this run

name: Templates Validation
on:
pull_request:
types:
- opened
- synchronize
jobs:
install-cache:
runs-on: ubuntu-latest
name: Install & Cache modules
steps:
- uses: actions/checkout@v3
- name: Cache node modules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: |
node_modules
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
- uses: actions/setup-node@v3
with:
node-version: '18.x'
always-auth: true
- name: Install dependencies
if: steps.cache-dependencies.outputs.cache-hit != true
run: npm ci
lint:
needs: install-cache
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Use node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Restore Cached Dependencies
uses: actions/cache@v3
id: cache-dependencies
with:
path: |
node_modules
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
- name: Lint Repo
run: npm run pretty:check:templates
validate:
needs: lint
name: Validate Schema
runs-on: ubuntu-latest
steps:
- name: Check Out Repository
uses: actions/checkout@v4
- name: Set Up Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Restore Cached Dependencies
uses: actions/cache@v3
id: cache-dependencies
with:
path: |
node_modules
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
- name: Validate Templates
run: npm run validate:templates