Skip to content

CI

CI #150

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# ESLint is a tool for identifying and reporting on patterns
# found in ECMAScript/JavaScript code.
# More details at https://github.com/eslint/eslint
# and https://eslint.org
name: CI
on:
push:
pull_request:
schedule:
- cron: "15 10 * * 5"
workflow_call:
jobs:
eslint:
name: Run eslint scanning
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- uses: pnpm/action-setup@v2.0.1
name: Install pnpm
id: pnpm-install
with:
version: 8.9.2
run_install: false
- name: Install depends
run: pnpm i
- name: Run ESLint
run: pnpm lint #--fix
# - name: Commit changes
# uses: EndBug/add-and-commit@v9
# with:
# author_name: GitHub Actions
# author_email: actions@github.com
# message: 'chore: `eslint --fix`'
# push: origin main
prettier:
name: Run Prettier
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- uses: pnpm/action-setup@v2.0.1
name: Install pnpm
id: pnpm-install
with:
version: 8.9.2
run_install: false
- name: Install depends
run: pnpm i
- name: Fretit
run: pnpm pretit
# - name: Commit changes
# uses: EndBug/add-and-commit@v9
# with:
# author_name: GitHub Actions
# author_email: actions@github.com
# message: 'chore: `prettier -w`'
# push: origin main
typing:
name: Run Type Checking
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- uses: pnpm/action-setup@v2.0.1
name: Install pnpm
id: pnpm-install
with:
version: 8.9.2
run_install: false
- name: Install depends
run: pnpm i
- uses: Wandalen/wretry.action@master
name: Test
continue-on-error: true
with:
command: pnpm test
attempt_limit: 3
attempt_delay: 2000
- name: Typing
run: pnpm typing
test:
name: Run Test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
node_version: [16, 20]
include:
# Active LTS + other OS
- os: macos-latest
node_version: 18
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2.3.1
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- uses: pnpm/action-setup@v2.0.1
name: Install pnpm
id: pnpm-install
with:
version: 8.9.2
run_install: false
- name: Install depends
run: pnpm i
- uses: Wandalen/wretry.action@master
name: Test
with:
command: pnpm test
attempt_limit: 3
attempt_delay: 2000
build:
name: Try build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
node_version: [16, 18, 20]
include:
# Active LTS + other OS
- os: macos-latest
node_version: 18
- os: windows-latest
node_version: 18
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- uses: pnpm/action-setup@v2.0.1
name: Install pnpm
id: pnpm-install
with:
version: 8.9.2
run_install: false
- name: Install depends
run: pnpm i
- name: Build
run: pnpm build