update octo-types #64
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: Code Style | |
on: | |
pull_request: | |
branches: | |
- '!main' | |
- '!master' | |
- '**' | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- uses: actions/cache@v3 | |
name: Setup npm cache | |
id: cache-node-modules | |
with: | |
path: ./node_modules | |
key: ${{ runner.os }}-npm-store-${{ hashFiles('./package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-npm-store- | |
- name: Install node modules | |
if: steps.cache-node-modules.outputs.cache-hit != 'true' | |
run: npm install --no-lockfile --prefer-offline | |
- name: Build the project | |
run: npm run build | |
check-types: | |
name: Check Types | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- uses: actions/cache@v3 | |
name: Setup npm cache | |
id: cache-node-modules | |
with: | |
path: ./node_modules | |
key: ${{ runner.os }}-npm-store-${{ hashFiles('./package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-npm-store- | |
- name: Install node modules | |
if: steps.cache-node-modules.outputs.cache-hit != 'true' | |
run: npm install --no-lockfile --prefer-offline --no-optional | |
- name: Do dry build | |
run: npm run build:dry | |
check-format: | |
name: Check format | |
needs: build | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- uses: actions/cache@v3 | |
name: Setup npm cache | |
id: cache-node-modules | |
with: | |
path: ./node_modules | |
key: ${{ runner.os }}-npm-store-${{ hashFiles('./package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-npm-store- | |
- name: Install node modules | |
if: steps.cache-node-modules.outputs.cache-hit != 'true' | |
run: npm install --no-lockfile --prefer-offline --no-optional | |
- name: Run Prettier | |
run: npm run format:check | |
check-code-quality: | |
name: Check code quality | |
needs: build | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- uses: actions/cache@v3 | |
name: Setup npm cache | |
id: cache-node-modules | |
with: | |
path: ./node_modules | |
key: ${{ runner.os }}-npm-store-${{ hashFiles('./package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-npm-store- | |
- name: Install node modules | |
if: steps.cache-node-modules.outputs.cache-hit != 'true' | |
run: npm install --no-lockfile --prefer-offline --no-optional | |
- name: Run ESLint | |
run: npm run lint | |
run-tests: | |
name: Run tests | |
needs: build | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- uses: actions/cache@v3 | |
name: Setup npm cache | |
id: cache-node-modules | |
with: | |
path: ./node_modules | |
key: ${{ runner.os }}-npm-store-${{ hashFiles('./package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-npm-store- | |
- name: Install node modules | |
if: steps.cache-node-modules.outputs.cache-hit != 'true' | |
run: npm install --no-lockfile --prefer-offline --no-optional | |
- name: Run tests | |
run: npm run test |