Skip to content

feat: increase the CI. add coverage, add create auto PR #5

feat: increase the CI. add coverage, add create auto PR

feat: increase the CI. add coverage, add create auto PR #5

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '20'
- name: Install Dependencies
run: npm install
- name: Run Linter
run: npm run lint
- name: Run Tests
run: npm run test
- name: Upload Code Coverage Results
uses: actions/upload-sarif@v1
with:
sarif_file: ./coverage/coverage-final.json
- name: Create Dynamic Pull Request
id: create_pr
run: |
commit_msg=$(git log --format=%B -n 1 $GITHUB_SHA)
title="Automated PR: $commit_msg"
body="This PR was created automatically when tests passed. Commit message: $commit_msg"
gh pr create --title "$title" --body "$body" --base main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}