Files
auto-changelog/.github/workflows/test.yml
T
Ardalan Amini c6140da009 build: integrate Rolldown (#216)
* build: integrate Rolldown

Signed-off-by: Ardalan Amini <[email protected]>

* ci: enhance test workflow and update metadata

- Added environment variables for Node & PNPM versions in the test workflow.
- Updated homepage URL in package metadata.

Signed-off-by: Ardalan Amini <[email protected]>

* build: define Node.js version requirement (>= 20) in package.json

Signed-off-by: Ardalan Amini <[email protected]>

---------

Signed-off-by: Ardalan Amini <[email protected]>
2025-06-07 21:51:25 +03:30

130 lines
3.1 KiB
YAML

name: Test
on : # rebuild any PRs and main branch changes
push :
branches:
- master
pull_request :
workflow_call:
env :
NODE_VERSION: 20
PNPM_VERSION: 10.11.0
jobs:
build : # make sure build/ci work properly
name : Build
runs-on: ubuntu-latest
steps :
- uses: actions/checkout@v4
- name: Use PNPM ${{ env.PNPM_VERSION }}
uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
cache : pnpm
node-version: ${{ env.NODE_VERSION }}
- name: Install dependencies
run : pnpm i
- name: Build using Rolldown
run : pnpm build
lint : # make sure build/ci work properly
name : Lint
runs-on: ubuntu-latest
steps :
- uses: actions/checkout@v4
- name: Use PNPM ${{ env.PNPM_VERSION }}
uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
cache : pnpm
node-version: ${{ env.NODE_VERSION }}
- name: Install dependencies
run : pnpm i
- name: Check code styles
run : pnpm lint
test : # make sure build/ci work properly
name : Test
runs-on: ubuntu-latest
steps :
- uses: actions/checkout@v4
- name: Use PNPM ${{ env.PNPM_VERSION }}
uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
cache : pnpm
node-version: ${{ env.NODE_VERSION }}
- name: Install dependencies
run : pnpm i
- name: Type check source files & unit tests
run : pnpm test:types
- name: Run unit tests
run : pnpm test:coverage
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
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
- name: Changelog
uses: ./
with:
semver : ${{ startsWith(github.ref, 'refs/tags/') }}
mention-new-contributors: ${{ github.ref_protected }}
live-test-with-inputs: # make sure the action works on a clean machine without building
name : Live Test with inputs
runs-on: ubuntu-latest
steps :
- uses: actions/checkout@v4
- name: Changelog
uses: ./
with:
commit-types : |
feat: Feature
default-commit-type : Default Type
mention-authors : false
mention-new-contributors: false
include-compare-link : false
semver : false