Skip to content

Commit

Permalink
chore: update release script and add test CI configuration file
Browse files Browse the repository at this point in the history
  • Loading branch information
kiki-kanri committed Oct 23, 2024
1 parent ac9ef1f commit 0f4e599
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
43 changes: 43 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Test Suite

on:
push:
tags:
- "v*"

workflow_dispatch:

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
node-version: [18.12.1, 20.0.0, 22.0.0]

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: latest

- name: Install dependencies
run: pnpm i

- name: Run tests with coverage
run: pnpm run test --coverage

- name: Upload coverage to Codecov
if: ${{ matrix.os == 'ubuntu-latest' && matrix.node-version == '22.0.0' }}
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"scripts": {
"build": "ts-project-builder ./src/constants.ts ./src/schema-builders/index.ts ./src/utils.ts --clean --preserve-modules",
"bumplog": "changelogen --bump",
"release": "pnpm run build && changelogen --push --release && sh ./build-and-publish.sh",
"release": "pnpm run build && pnpm run test && changelogen --push --release && sh ./build-and-publish.sh",
"test": "jest --coverage"
},
"dependencies": {
Expand Down

0 comments on commit 0f4e599

Please sign in to comment.