Skip to content

Commit

Permalink
build: fix legacy path error
Browse files Browse the repository at this point in the history
  • Loading branch information
simonguo committed Oct 16, 2024
1 parent bbecdb4 commit 4743436
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 27 deletions.
29 changes: 3 additions & 26 deletions .github/workflows/run-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,50 +18,27 @@ jobs:

strategy:
matrix:
browser: [chrome, firefox, edge]
browser: [chrome, edge]

steps:
# Checkout latest code
- name: Checkout
uses: actions/checkout@v3 # Already on latest
uses: actions/checkout@v3

# Install NPM dependencies
- name: Install dependencies
run: npm ci

# Cache Cypress files
- name: Cache Cypress
uses: actions/cache@v3 # Upgrade to v3
uses: actions/cache@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/
2 changes: 1 addition & 1 deletion scripts/proxyDirectories.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ async function proxyComponent() {
await writePkgFile({
resources: legacyIcons,
pkgName: '@rsuite/icons/legacy',
subPath: '/icons/legacy',
subPath: '/icons/legacy/',
filePath: '../..',
dir: path.join(libRoot, 'legacy')
});
Expand Down

0 comments on commit 4743436

Please sign in to comment.