feat: add hygen script for bootstrapping new templates #12
Workflow file for this run
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
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 |