Skip to content

Fix an unstable "Theme switcher" test. #114

Fix an unstable "Theme switcher" test.

Fix an unstable "Theme switcher" test. #114

Workflow file for this run

name: CI/CD Pipeline
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build-test-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Adding Node.js
uses: actions/setup-node@v4
with:
node-version: 20.14.0
cache: 'npm'
- name: Install Dependencies
run: npm install
- name: Cache Angular build output
id: cache-ng-build
uses: actions/cache@v4
with:
path: dist
key: ng-build-${{ hashFiles('package-lock.json', 'src/**', 'angular.json', 'scripts/gh-pages-before-add.js') }}
restore-keys: |
ng-build-${{ hashFiles('package-lock.json', 'src/**', 'angular.json', 'scripts/gh-pages-before-add.js') }}
- name: Build Application
run: npm run build
if: steps.cache-ng-build.outputs.cache-hit != 'true'
- name: Run TestCafe tests in container
run: |
docker run -w /opt/tests -v ${{ github.workspace }}:/opt/tests timbru31/node-chrome:20 npx testcafe chrome:headless ./e2e/fixtures --app="npm run serve:ci" -c 4
- name: Upload Artifacts
uses: actions/upload-artifact@v4
if: failure()
with:
path: |
e2e/screenshots
e2e/visual-regression-screenshots
if-no-files-found: ignore
retention-days: 1
compression-level: 0
overwrite: true
- name: Deploy to Github Pages
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && success()
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: |
git remote set-url origin https://git:${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
npm run deploy -- -u "github-actions-bot <[email protected]>"