Spaces:
No application file
No application file
Upload .github\workflows\web-tests.yml with huggingface_hub
Browse files
.github//workflows//web-tests.yml
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Web Tests
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
pull_request:
|
| 5 |
+
branches:
|
| 6 |
+
- main
|
| 7 |
+
paths:
|
| 8 |
+
- web/**
|
| 9 |
+
|
| 10 |
+
concurrency:
|
| 11 |
+
group: web-tests-${{ github.head_ref || github.run_id }}
|
| 12 |
+
cancel-in-progress: true
|
| 13 |
+
|
| 14 |
+
jobs:
|
| 15 |
+
test:
|
| 16 |
+
name: Web Tests
|
| 17 |
+
runs-on: ubuntu-latest
|
| 18 |
+
defaults:
|
| 19 |
+
run:
|
| 20 |
+
working-directory: ./web
|
| 21 |
+
|
| 22 |
+
steps:
|
| 23 |
+
- name: Checkout code
|
| 24 |
+
uses: actions/checkout@v4
|
| 25 |
+
with:
|
| 26 |
+
fetch-depth: 0
|
| 27 |
+
persist-credentials: false
|
| 28 |
+
|
| 29 |
+
- name: Check changed files
|
| 30 |
+
id: changed-files
|
| 31 |
+
uses: tj-actions/changed-files@v45
|
| 32 |
+
with:
|
| 33 |
+
files: web/**
|
| 34 |
+
|
| 35 |
+
- name: Install pnpm
|
| 36 |
+
uses: pnpm/action-setup@v4
|
| 37 |
+
with:
|
| 38 |
+
version: 10
|
| 39 |
+
run_install: false
|
| 40 |
+
|
| 41 |
+
- name: Setup Node.js
|
| 42 |
+
uses: actions/setup-node@v4
|
| 43 |
+
if: steps.changed-files.outputs.any_changed == 'true'
|
| 44 |
+
with:
|
| 45 |
+
node-version: 20
|
| 46 |
+
cache: pnpm
|
| 47 |
+
cache-dependency-path: ./web/package.json
|
| 48 |
+
|
| 49 |
+
- name: Install dependencies
|
| 50 |
+
if: steps.changed-files.outputs.any_changed == 'true'
|
| 51 |
+
run: pnpm install --frozen-lockfile
|
| 52 |
+
|
| 53 |
+
- name: Run tests
|
| 54 |
+
if: steps.changed-files.outputs.any_changed == 'true'
|
| 55 |
+
run: pnpm test
|