Skip to content

Commit

Permalink
Run CI on Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ybiquitous committed Jul 11, 2024
1 parent 3b9032d commit c5f3286
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
32 changes: 32 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Test

on:
push:
branches: [main]
pull_request:
workflow_dispatch:

jobs:
lint:
uses: stylelint/.github/.github/workflows/lint.yml@main

test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: npm

- name: Install latest npm
run: npm install --global npm@latest

- name: Install dependencies
run: npm ci

- name: Run test
run: npm test
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@
"author": "Masafumi Koba",
"scripts": {
"format": "prettier --write .",
"lint": "npm run lint:formatting",
"lint:formatting": "prettier --check .",
"prepare": "husky",
"test": "npm run lint:formatting"
"test": "npm run lint"
},
"lint-staged": {
"*.{json,md,yaml,yml}": "prettier --write"
Expand Down

0 comments on commit c5f3286

Please sign in to comment.