Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added .yml file for webapp to run test on making the pr. #19

Merged
merged 16 commits into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading