fix: ci node version #23
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 | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
formatting: | |
name: Formatting | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v2 | |
- name: Setup Node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 18 | |
- name: Restore CI Cache | |
uses: actions/cache@v2 | |
id: cache | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-16-${{ hashFiles('**/yarn.lock') }} | |
- name: Install Dependencies | |
if: ${{ !steps.cache.outputs.cache-hit }} | |
run: yarn --frozen-lockfile | |
- name: Run Prettier | |
run: yarn prettier --check src/**/*.js | |
linting: | |
name: Linting | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v2 | |
- name: Setup Node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 18 | |
- name: Restore CI Cache | |
uses: actions/cache@v2 | |
id: cache | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-16-${{ hashFiles('**/yarn.lock') }} | |
- name: Install Dependencies | |
if: ${{ !steps.cache.outputs.cache-hit }} | |
run: yarn --frozen-lockfile | |
- name: Run ESLint | |
run: yarn eslint src --ext js | |
analyze: | |
name: Analyze | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v2 | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v1 | |
- name: Autobuild | |
uses: github/codeql-action/autobuild@v1 | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v1 |