Skip to content

Commit

Permalink
ci: update github action
Browse files Browse the repository at this point in the history
  • Loading branch information
crimx committed Aug 21, 2024
1 parent c3c598b commit 3e30ce3
Show file tree
Hide file tree
Showing 4 changed files with 3,083 additions and 2,518 deletions.
33 changes: 16 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,28 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2.3.1
uses: actions/checkout@v4

- name: Cache pnpm modules
uses: actions/cache@v2
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
- name: Install pnpm 📦
uses: pnpm/action-setup@v4

- name: Install pnpm 🤏🏻
uses: pnpm/action-setup@v2.1.0
- uses: actions/setup-node@v4
with:
version: latest
run_install: true
cache: pnpm

- name: Install dependencies 📦
run: pnpm install

- name: Lint 🧹
run: pnpm run lint

- name: Build 🔧
run: |
pnpm run lint
pnpm run test
pnpm run build
run: pnpm run build

- name: Test 🧪
run: pnpm run test:coverage

- name: Coveralls
- name: Coveralls 🎉
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
31 changes: 15 additions & 16 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,23 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2.3.1
uses: actions/checkout@v4

- name: Cache pnpm modules
uses: actions/cache@v2
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
- uses: pnpm/action-setup@v4
name: Install pnpm 📦

- name: Install pnpm 🤏🏻
uses: pnpm/action-setup@v2.1.0
- uses: actions/setup-node@v4
with:
version: 6.32.4
run_install: true
cache: pnpm

- name: Install dependencies 📦
run: pnpm install

- name: Lint 🧹
run: pnpm run lint

- name: Build 🔧
run: |
pnpm run lint
pnpm run test
pnpm run build
run: pnpm run build

- name: Test 🧪
run: pnpm run test:coverage
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"prepublishOnly": "pnpm run build",
"lint": "eslint --ext .ts,.tsx . && prettier --check .",
"test": "jest --coverage",
"test:coverage": "jest --coverage",
"docs": "typedoc --options typedoc.json",
"build": "cross-env NODE_ENV=production tsup-node src/main.ts",
"build:min": "cross-env NODE_ENV=production MINIFY=true tsup-node src/main.ts && node scripts/gzip.mjs",
Expand Down Expand Up @@ -55,5 +56,6 @@
"typescript": "^4.4.3",
"value-enhancer": "^5.0.0",
"yoctocolors": "^1.0.0"
}
},
"packageManager": "pnpm@9.7.0"
}
Loading

0 comments on commit 3e30ce3

Please sign in to comment.