ci: update test workflow

Signed-off-by: Ardalan Amini <[email protected]>
This commit is contained in:
Ardalan Amini committed 2025-02-27 14:47:10 +03:30
1 parent 7a94b0db61
commit 3c1177539c
3 files changed
+60 -16

No files matched your search

+1 -1
View File
@@ -21,6 +21,6 @@ updates:
day : monday
versioning-strategy: increase
commit-message :
prefix : build(deps)
prefix: build(deps)
reviewers :
- ardalanamini
+58 -14
View File
@@ -8,7 +8,7 @@ on : # rebuild any PRs and main branch changes
workflow_call:
jobs:
build : # make sure build/ci work properly
build : # make sure build/ci work properly
name : Build
runs-on: ubuntu-latest
@@ -19,7 +19,35 @@ jobs:
- name: Use PNPM
uses: pnpm/action-setup@v4
with:
version: 8
version: 10
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
cache : pnpm
node-version: 20
- name: Install dependencies
run : pnpm i
- name: Build using TypeScript
run : pnpm build
- name: Package using ncc
run : pnpm package
lint : # make sure build/ci work properly
name : Lint
runs-on: ubuntu-latest
steps :
- uses: actions/checkout@v4
- name: Use PNPM
uses: pnpm/action-setup@v4
with:
version: 10
- name: Use Node.js 20
uses: actions/setup-node@v4
@@ -33,20 +61,36 @@ jobs:
- name: Check code styles
run : pnpm lint
- name: Run unit tests
run : pnpm test
- name: Build using TypeScript
run : pnpm build
- name: Package using ncc
run : pnpm package
test : # make sure the action works on a clean machine without building
test : # make sure build/ci work properly
name : Test
runs-on: ubuntu-latest
steps :
- uses: actions/checkout@v4
- name: Use PNPM
uses: pnpm/action-setup@v4
with:
version: 10
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
cache : pnpm
node-version: 20
- name: Install dependencies
run : pnpm i
- name: Run unit tests
run : pnpm test:coverage
live-test : # make sure the action works on a clean machine without building
name : Live Test
runs-on: ubuntu-latest
steps :
- uses: actions/checkout@v4
@@ -56,8 +100,8 @@ jobs:
semver : ${{ startsWith(github.ref, 'refs/tags/') }}
mention-new-contributors: ${{ github.ref_protected }}
test-with-inputs: # make sure the action works on a clean machine without building
name : Test with inputs
live-test-with-inputs: # make sure the action works on a clean machine without building
name : Live Test with inputs
runs-on: ubuntu-latest
+1 -1
View File
@@ -32,7 +32,7 @@
"package": "ncc build --out action --minify --source-map --license licenses.txt",
"all": "pnpm lint:fix && pnpm build && pnpm package",
"test": "node --expose-gc node_modules/jest/bin/jest -c jest.config.ts",
"test:coverage": "pnpm test -- --coverage"
"test:coverage": "pnpm test --coverage"
},
"dependencies": {
"@actions/core": "^1.11.1",