Introduced a GitHub Actions workflow to automate release creation upon pushes to the main branch, enhancing CI/CD efficiency. Updated the pull request workflow to support manual triggers. Adjusted Jest's coverage thresholds from 80% to 70% to reflect current testing standards. Added "types" field in package.json for TypeScript declarations. Created an empty README.md.
32 lines
734 B
YAML
32 lines
734 B
YAML
name: Run Build and Tests on Pull Request
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
workflow_dispatch: # Allows manual execution of the workflow.
|
|
|
|
jobs:
|
|
build-and-test:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20.8.0'
|
|
|
|
- name: Install Dependencies
|
|
run: npm install
|
|
|
|
- name: Run Tests
|
|
run: npm run test:verbose
|
|
|
|
- name: Build the Project
|
|
run: npm run build:tsc
|