ci: create typescript CI pipeline

This commit is contained in:
Valerio Ageno
2024-06-16 10:36:55 +02:00
parent 0e4debdb8a
commit b3ef9f0ee6
6 changed files with 62 additions and 3 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
name: Cargo build and test
name: Rust CI
on:
push:
+54
View File
@@ -0,0 +1,54 @@
name: Typescript CI
on:
push:
pull_request:
jobs:
build-and-test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install pnpm
run: npm i -g pnpm
- name: Install dependencies
run: pnpm install
- name: Build project
run: pnpm build
fmt-lint-and-types:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: CI Checkout
uses: actions/setup-node@v2
with:
node-version: 20.x
- name: Install pnpm
run: npm i -g pnpm
- name: Install dependencies
run: pnpm install
- name: Check formatting
run: pnpm format:check
- name: Lint
run: pnpm lint
- name: Types
run: pnpm types
+2
View File
@@ -9,6 +9,8 @@
"build": "turbo build",
"lint": "turbo lint",
"format": "turbo format",
"format:check": "turbo format:check",
"types": "turbo types",
"test": "turbo test"
},
"keywords": [],
@@ -1,2 +1,2 @@
dist/
dist
pnpm-lock.yaml
+2 -1
View File
@@ -6,7 +6,8 @@
"dev": "vite build --watch",
"build": "vite build",
"lint": "eslint --ext .ts,.tsx ./src -c ../../.eslintrc",
"format": "prettier -u --write '**/*'",
"format": "prettier -u --write --ignore-unknown '**/*'",
"format:check": "prettier --check --ignore-unknown '**/*'",
"types": "tsc --noEmit",
"test": "vitest"
},
+2
View File
@@ -3,6 +3,8 @@
"tasks": {
"lint": {},
"format": {},
"format:check": {},
"types": {},
"test": {},
"build": {
"outputs": [