Skip to content

TypeScript化・Viteによるデモ環境の構築 等 #2

TypeScript化・Viteによるデモ環境の構築 等

TypeScript化・Viteによるデモ環境の構築 等 #2

Workflow file for this run

name: Run test
on:
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write # needed to commit the changes
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "18.13"
- name: Setup Pnpm
uses: pnpm/action-setup@v3
with:
version: 9.0.6
- name: Install dependencies
run: pnpm install
- name: Run Unit Tests
run: pnpm dlx vitest --coverage
- name: Publish Results Badge (Lines)
uses: wjervis7/[email protected]
if: success() || failure() # run whether steps succeed or not
with:
result-type: lines
upload-badge: false
badge-path: docs/images/coverage/lines-badge.svg
- name: Publish Results Badge (Statements)
uses: wjervis7/[email protected]
if: success() || failure() # run whether steps succeed or not
with:
result-type: statements
upload-badge: false
badge-path: docs/images/coverage/statements-badge.svg
- name: Publish Results Badge (Functions)
uses: wjervis7/[email protected]
if: success() || failure() # run whether steps succeed or not
with:
result-type: functions
upload-badge: false
badge-path: docs/images/coverage/functions-badge.svg
- name: Publish Results Badge (Branches)
uses: wjervis7/[email protected]
if: success() || failure() # run whether steps succeed or not
with:
result-type: branches
upload-badge: false
badge-path: docs/images/coverage/branches-badge.svg
- name: Commit badges
uses: stefanzweifel/git-auto-commit-action@v5
with:
file_pattern: "docs/images/coverage/*.svg"