Skip to content

Commit bacd2a1

Browse files
committed
feat: use vite testing
1 parent 67be98e commit bacd2a1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+7474
-17938
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ jobs:
3434
run: |
3535
echo "CYPRESS_RECORD_KEY=${{ secrets.CYPRESS_RECORD_KEY }}" >> $GITHUB_ENV
3636
echo "GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> $GITHUB_ENV
37-
echo "CYPRESS_INSTALL_BINARY=6.0.0" >> $GITHUB_ENV
37+
echo "CYPRESS_INSTALL_BINARY=13.14.2" >> $GITHUB_ENV
3838
3939
- name: Checkout
4040
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2
4141

4242
- name: Cypress run
43-
uses: cypress-io/github-action@v2
43+
uses: cypress-io/github-action@v4
4444
with:
4545
browser: ${{ matrix.browsers }}
4646
build: npm run build

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
# production
2121
/build
22+
/dist
2223

2324
# misc
2425
.DS_Store

.husky/pre-commit

100755100644
File mode changed.

cypress-install.js

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
1-
const util = require('cypress/lib/util');
2-
const execa = require('execa');
1+
import { spawn } from 'child_process';
32

4-
const pkg = util.pkgVersion();
3+
const child = spawn('npm', ['run', 'cypress:install'], {
4+
stdio: 'inherit'
5+
});
56

6-
(async () => {
7-
console.log('Installing Cypress ' + pkg);
8-
await execa('npm', ['run', 'cypress:install'], {
9-
env: { CYPRESS_INSTALL_BINARY: pkg }
10-
});
11-
console.log('Cypress installed');
12-
})();
7+
child.on('close', code => {
8+
if (code) {
9+
console.error('Cypress installation failed with code:', code);
10+
}
11+
});
12+
13+
child.on('error', error => {
14+
console.error('Cypress installation error:', error);
15+
});

cypress.config.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
const { defineConfig } = require('cypress');
2+
3+
module.exports = defineConfig({
4+
e2e: {
5+
baseUrl: 'http://localhost:3001',
6+
retries: 4
7+
}
8+
})

cypress.json

Lines changed: 0 additions & 3 deletions
This file was deleted.
File renamed without changes.
File renamed without changes.

cypress/plugins/index.js

Lines changed: 0 additions & 22 deletions
This file was deleted.
File renamed without changes.

0 commit comments

Comments
 (0)