This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
name: Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
frontend-test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Node.js 22
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '22'
|
||||
cache: 'npm'
|
||||
cache-dependency-path: package-lock.json
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
npm config set fetch-retries 5
|
||||
npm config set fetch-retry-mintimeout 10000
|
||||
npm config set fetch-retry-maxtimeout 120000
|
||||
for i in 1 2 3; do
|
||||
npm install --legacy-peer-deps && break
|
||||
echo "Attempt $i failed, retrying in 20s..."
|
||||
sleep 20
|
||||
done
|
||||
|
||||
# heft test = сборка (sass + typescript + lint) и следом Jest. Это НЕ то же
|
||||
# самое, что npm run build: там дополнительно пакуется .sppkg, а для проверки
|
||||
# на PR упаковка не нужна.
|
||||
- name: Run unit tests (Jest via heft)
|
||||
run: npx heft test --clean
|
||||
Reference in New Issue
Block a user