Skip to content

Commit

Permalink
ci: 添加 Github Action
Browse files Browse the repository at this point in the history
  • Loading branch information
LokiSharp committed Oct 14, 2023
1 parent 0a188b2 commit 7b187a4
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
28 changes: 28 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: CI

on:
push:
branches: ["master", "dev", "releases/**"]
pull_request:
branches: ["master"]

jobs:
build:
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
node-version: [16.x, 18.x, 20.x, latest]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run lint
- run: npm run build
- run: npm run test
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "index.js",
"scripts": {
"test": "npm run test --workspaces",
"bulid": "npm run build --workspaces",
"build": "npm run build --workspaces",
"lint": "npm run lint --workspaces"
},
"repository": {
Expand Down

0 comments on commit 7b187a4

Please sign in to comment.