Skip to content

Commit

Permalink
feat: increase the CI. add coverage, add create auto PR
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianBx committed Nov 17, 2023
1 parent 39c5ce5 commit 327d01e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,32 @@ jobs:
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 }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ dist
dist-ssr
*.local
coverage
!coverage/coverage-final.json

# Editor directories and files
.vscode/*
Expand Down

0 comments on commit 327d01e

Please sign in to comment.