Skip to content

Merge pull request #42 from traPtitech/refactor/convert_to_script_setup #83

Merge pull request #42 from traPtitech/refactor/convert_to_script_setup

Merge pull request #42 from traPtitech/refactor/convert_to_script_setup #83

Workflow file for this run

name: CI
on:
push:
branches:
- 'master'
pull_request:
jobs:
packages:
name: Packages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: .node-version
cache: npm
- run: SKIP_GENAPI=1 npm ci
genApi:
name: Generate APIs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: .node-version
cache: npm
- run: SKIP_GENAPI=1 npm ci
- run: npm run postinstall
- uses: actions/upload-artifact@v3
with:
name: apis
path: ./src/lib/apis/generated
build:
name: Build
runs-on: ubuntu-latest
needs: [packages, genApi]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: .node-version
cache: npm
- run: SKIP_GENAPI=1 npm ci
- uses: actions/download-artifact@v3
with:
name: apis
path: ./src/lib/apis/generated
- run: npm run build
env:
NODE_ENV: production
lint:
name: Lint
runs-on: ubuntu-latest
needs: [packages, genApi]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: .node-version
cache: npm
- run: SKIP_GENAPI=1 npm ci
- uses: actions/download-artifact@v3
with:
name: apis
path: ./src/lib/apis/generated
- run: npm run lint
format:
name: Format
runs-on: ubuntu-latest
needs: [packages, genApi]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: .node-version
cache: npm
- run: SKIP_GENAPI=1 npm ci
- uses: actions/download-artifact@v3
with:
name: apis
path: ./src/lib/apis/generated
- run: npm run format
typeCheck:
name: Type Check
runs-on: ubuntu-latest
needs: [packages, genApi]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: .node-version
cache: npm
- run: SKIP_GENAPI=1 npm ci
- uses: actions/download-artifact@v3
with:
name: apis
path: ./src/lib/apis/generated
- run: npm run type-check