Skip to content

FIX: Add restart of animations #152

FIX: Add restart of animations

FIX: Add restart of animations #152

name: CI
permissions:
contents: write
on:
push:
branches: [ "QA", "dev" ]
pull_request:
branches: [ "dev" ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Deploy Application
env:
deploy_url: ${{ secrets.RENDER_DEPLOY_HOOK_URL }}
run: |
if [[ -z "$deploy_url" ]]; then
echo "Error: deploy_url is not set!"
exit 1
fi
echo "Triggering deployment..."
curl -v "$deploy_url"
sleep 60
chrome-tests:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '23.6.0'
- name: Install dependencies
run: |
cd ./src/test
npm install
npm install typescript
- name: Run Chrome Tests
run: |
cd ./src/test
npx tsc
for file in *chrome*.js; do node "$file"; done
- name: Upload Chrome Logs
run: ls -l ./src/test/logs
- name: Commit and push JSON logs to QA
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
# Make sure we are on QA branch
git fetch origin
if git ls-remote --exit-code --heads origin QA; then
git checkout QA
git pull --rebase origin QA
else
git checkout -b QA
git push -u origin QA
fi
# Ensure logs directory exists
mkdir -p ./src/test/logs
# Check if there are changes to commit
if [[ -n $(git status --porcelain src/test/logs/*.json) ]]; then
git add -f src/test/logs/*.json
git commit -m "Add generated JSON logs from tests"
git push origin QA
else
echo "No log changes to commit."
fi
firefox-tests:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '23.6.0'
- name: Install dependencies
run: |
cd ./src/test
npm install
npm install typescript
- name: Run Firefox Tests
run: |
firefox --version
cd ./src/test
npx tsc
for file in *firefox*.js; do node "$file"; done
- name: Upload Firefox Logs
run: ls -l ./src/test/logs
- name: Commit and push JSON logs to QA
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
# Make sure we are on QA branch
git fetch origin
if git ls-remote --exit-code --heads origin QA; then
git checkout QA
git pull --rebase origin QA
else
git checkout -b QA
git push -u origin QA
fi
# Ensure logs directory exists
mkdir -p ./src/test/logs
# Check if there are changes to commit
if [[ -n $(git status --porcelain src/test/logs/*.json) ]]; then
git add -f src/test/logs/*.json
git commit -m "Add generated JSON logs from tests"
git push origin QA
else
echo "No log changes to commit."
fi
edge-tests:
runs-on: windows-latest
needs: build
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '23.6.0'
- name: Install dependencies
run: |
cd ./src/test
npm install
npm install typescript
- name: Install Edge Browser
run: choco install microsoft-edge
- name: Run Edge Tests
shell: pwsh
run: |
cd ./src/test
npx tsc
Get-ChildItem *edge*.js | ForEach-Object { node $_.Name }
- name: Upload Edge Logs
run: ls -l ./src/test/logs
- name: Commit and push JSON logs to QA
shell: pwsh
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
# Fetch latest branch info
git fetch origin
# Check if QA branch exists
$branchExists = git ls-remote --exit-code --heads origin QA
if ($branchExists) {
git checkout QA
git pull --rebase origin QA
} else {
git checkout -b QA
git push -u origin QA
}
# Ensure logs directory exists
New-Item -ItemType Directory -Force -Path ./src/test/logs
# Check if there are changes to commit
$changes = git status --porcelain src/test/logs/*.json
if ($changes) {
git add -f src/test/logs/*.json
git commit -m "Add generated JSON logs from tests"
git push origin QA
} else {
Write-Output "No log changes to commit."
}
safari-tests:
runs-on: macos-latest
needs: build
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '23.6.0'
- name: Install dependencies
run: |
cd ./src/test
npm install
npm install typescript
- name: Set up SafariDriver
run: sudo safaridriver --enable
- name: Run Safari Tests
run: |
cd ./src/test
npx tsc
for file in *safari*.js; do node "$file"; done
- name: Upload Safari Logs
run: ls -l ./src/test/logs
- name: Commit and push JSON logs to QA
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
# Make sure we are on QA branch
git fetch origin
if git ls-remote --exit-code --heads origin QA; then
git checkout QA
git pull --rebase origin QA
else
git checkout -b QA
git push -u origin QA
fi
# Ensure logs directory exists
mkdir -p ./src/test/logs
# Check if there are changes to commit
if [[ -n $(git status --porcelain src/test/logs/*.json) ]]; then
git add -f src/test/logs/*.json
git commit -m "Add generated JSON logs from tests"
git push origin QA
else
echo "No log changes to commit."
fi