🩹 correct warning and minor ui fix #3
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: CI / CD | |
on: | |
push: | |
pull_request: | |
jobs: | |
install: | |
name: Install | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version-file: [ '.nvmrc' ] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- run: git checkout HEAD^2 | |
if: ${{ github.event_name == 'pull_request' }} | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install dependencies | |
run: npm i | |
- name: Cache node modules | |
uses: actions/cache@v4 | |
id: restore-build | |
with: | |
path: ./* | |
key: ${{ github.sha }} | |
linter: | |
name: Linter | |
runs-on: ubuntu-latest | |
needs: [install] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- uses: actions/cache@v4 | |
id: restore-build | |
with: | |
path: ./* | |
key: ${{ github.sha }} | |
- name: Run linter | |
run: npm run lint | |
# unit_test: | |
# name: Unit test | |
# runs-on: ubuntu-latest | |
# needs: [install] | |
# steps: | |
# - name: Checkout repository | |
# uses: actions/checkout@v3 | |
# with: | |
# fetch-depth: 2 | |
# - name: Use Node.js ${{ matrix.node-version }} | |
# uses: actions/setup-node@v3 | |
# with: | |
# node-version: ${{ matrix.node-version }} | |
# - uses: actions/cache@v3 | |
# id: restore-build | |
# with: | |
# path: ./* | |
# key: ${{ github.sha }} | |
# - name: Run unit test | |
# run: npm test |