feat(IconProvider): support global configuration classPrefix and csp #91
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run Test Cases | |
# Run on all branch | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
test: | |
name: 'Test' | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
browser: [chrome, firefox, edge] | |
steps: | |
# Checkout latest code | |
- name: Checkout | |
uses: actions/checkout@v3 # Already on latest | |
# Install NPM dependencies | |
- name: Install dependencies | |
run: npm ci | |
# Cache Cypress files | |
- name: Cache Cypress | |
uses: actions/cache@v3 # Upgrade to v3 | |
with: | |
path: ~/.cache/Cypress | |
key: cypress-${{ runner.os }}-${{ hashFiles('package-lock.json') }}-${{ github.run_id }} | |
# Install and start Xvfb for Firefox | |
- name: Install Xvfb | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y xvfb | |
export DISPLAY=:99.0 | |
Xvfb :99 -screen 0 1280x1024x16 & | |
# Run Cypress tests on multiple browsers | |
- name: Cypress run | |
uses: cypress-io/github-action@v5 # Ensure latest Cypress GitHub Action | |
with: | |
component: true | |
browser: ${{ matrix.browser }} | |
env: | |
# Disable GPU acceleration for headless browsers | |
CYPRESS_runTestsInHeadlessMode: '--disable-gpu' | |
MOZ_HEADLESS: 1 | |
MOZ_X11_EGL: 1 | |
CYPRESS_defaultCommandTimeout: 90000 | |
CYPRESS_pageLoadTimeout: 120000 | |
# Upload Cypress test results if the job fails | |
- name: Upload Cypress results | |
if: failure() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: cypress-results | |
path: cypress/results/ |