Skip to content

Commit

Permalink
Merge pull request #19 from Shubh942/master4
Browse files Browse the repository at this point in the history
Added .yml file for webapp to run test on making the pr.
  • Loading branch information
Ammoniya authored Jul 2, 2024
2 parents 9f12e19 + 2b7e2c9 commit f283454
Show file tree
Hide file tree
Showing 16 changed files with 3,247 additions and 80 deletions.
File renamed without changes.
36 changes: 36 additions & 0 deletions .github/workflows/run-test-for-webapp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Run NPM Tests on Pull Request

on:
pull_request:
branches:
- main

jobs:
test-npm:
runs-on: ubuntu-latest

steps:
- name: Checkout target branch
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.base.ref }}

- name: Fetch pull request changes
run: |
git fetch origin +refs/pull/${{ github.event.pull_request.number }}/merge:pr
git checkout pr
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "18"

- name: Install npm dependencies
run: |
cd webapp
npm install
- name: Run npm tests with coverage
run: |
cd webapp
npx vitest --coverage.enabled true
Loading

0 comments on commit f283454

Please sign in to comment.