* TP-46407 | added build and prettier file * TP-46407 | yarn pretty added * TP-46407 | package.json configuered * TP-46407 | dockerfile link fix * TP-46407 | dockerfile link fix revert
50 lines
1.5 KiB
YAML
50 lines
1.5 KiB
YAML
# This workflow will do a clean install of node dependencies, build the source code across different versions of node
|
|
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
|
|
|
name: Lint and Prettier checks
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
pull_request:
|
|
branches: [master]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: [default]
|
|
|
|
strategy:
|
|
matrix:
|
|
node-version: [18.17.1]
|
|
|
|
name: Lint checks and prettier
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- name: Setup Yarn
|
|
run: npm install -g yarn
|
|
|
|
- name: Get yarn cache directory path
|
|
id: yarn-cache-dir-path
|
|
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
|
|
|
|
- uses: actions/cache@v3
|
|
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
|
with:
|
|
key: ${{ runner.os }}-yarn-lint-and-prettier-${{ hashFiles('**/yarn.lock') }}
|
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
|
restore-keys: |
|
|
${{ runner.os }}-yarn-lint-and-prettier-
|
|
|
|
- name: Install Dependencies
|
|
run: yarn
|
|
|
|
- name: Check Lint
|
|
run: yarn eslint-check-quiet # Using quiet mode to prevent logs in actions
|
|
|
|
- name: Check Code Formatting
|
|
run: yarn prettier-check |