Skip to content

Commit 607b12a

Browse files
ci: move to github actions
1 parent 528e4e0 commit 607b12a

File tree

4 files changed

+59
-19
lines changed

4 files changed

+59
-19
lines changed

.github/workflows/review.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
on:
2+
- push
3+
- pull_request
4+
5+
jobs:
6+
cache-and-install:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v3
12+
13+
- name: Install Node.js
14+
uses: actions/setup-node@v3
15+
with:
16+
node-version: 16
17+
18+
- uses: pnpm/action-setup@v2
19+
name: Install pnpm
20+
id: pnpm-install
21+
with:
22+
version: 7
23+
run_install: false
24+
25+
- name: Get pnpm store directory
26+
id: pnpm-cache
27+
shell: bash
28+
run: |
29+
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
30+
31+
- uses: actions/cache@v3
32+
name: Setup pnpm cache
33+
with:
34+
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
35+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
36+
restore-keys: |
37+
${{ runner.os }}-pnpm-store-
38+
39+
- name: Install dependencies
40+
run: pnpm install
41+
42+
- name: Format
43+
run: pnpm format:check
44+
45+
- name: Lint
46+
run: pnpm format:check
47+
48+
- name: Tests
49+
run: pnpm test
50+
51+
- name: Coverage
52+
uses: codecov/codecov-action@v3

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
npm test

.travis.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"clean": "rimraf coverage dist es lib",
1111
"prepublishOnly": "run-s build",
1212
"test": "vitest run --coverage",
13-
"lint": "xo"
13+
"lint": "xo",
14+
"prepare": "husky install"
1415
},
1516
"files": [
1617
"dist"
@@ -41,7 +42,7 @@
4142
"@vitest/coverage-c8": "0.26.2",
4243
"eslint-config-unicorn-camelcase": "0.1.1",
4344
"flux-standard-action": "2.1.2",
44-
"husky": "8.0.2",
45+
"husky": "^8.0.0",
4546
"lint-staged": "13.1.0",
4647
"npm-run-all": "4.1.5",
4748
"prettier": "2.8.1",

0 commit comments

Comments
 (0)