mirror of
https://github.com/aleleba/create-react-ssr.git
synced 2025-01-09 21:46:56 -06:00
PR-579798: trying to fix Cypress component testing.
This commit is contained in:
parent
69fa169a71
commit
bac407a59b
3
.github/workflows/npm-publish.yml
vendored
3
.github/workflows/npm-publish.yml
vendored
@ -35,12 +35,9 @@ jobs:
|
|||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
# Install NPM dependencies, cache them correctly
|
# Install NPM dependencies, cache them correctly
|
||||||
# and run all Cypress tests
|
# and run all Cypress tests
|
||||||
- name: Cypress install
|
|
||||||
run: npm i
|
|
||||||
- name: Cypress run
|
- name: Cypress run
|
||||||
uses: cypress-io/github-action@v5 # use the explicit version number
|
uses: cypress-io/github-action@v5 # use the explicit version number
|
||||||
with:
|
with:
|
||||||
install: false
|
|
||||||
component: true
|
component: true
|
||||||
publish-npm:
|
publish-npm:
|
||||||
needs: [ test, cypress-run, cypress-run-component ]
|
needs: [ test, cypress-run, cypress-run-component ]
|
||||||
|
3
.github/workflows/npm-test.yml
vendored
3
.github/workflows/npm-test.yml
vendored
@ -41,12 +41,9 @@ jobs:
|
|||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
# Install NPM dependencies, cache them correctly
|
# Install NPM dependencies, cache them correctly
|
||||||
# and run all Cypress tests
|
# and run all Cypress tests
|
||||||
- name: Cypress install
|
|
||||||
run: npm i
|
|
||||||
- name: Cypress run
|
- name: Cypress run
|
||||||
uses: cypress-io/github-action@v5 # use the explicit version number
|
uses: cypress-io/github-action@v5 # use the explicit version number
|
||||||
with:
|
with:
|
||||||
install: false
|
|
||||||
component: true
|
component: true
|
||||||
test-build-package:
|
test-build-package:
|
||||||
needs: [ test, cypress-run, cypress-run-component ]
|
needs: [ test, cypress-run, cypress-run-component ]
|
||||||
|
@ -15,28 +15,16 @@ const dotEnvToParse = dotenv.config();
|
|||||||
const externalCss = process.env.EXTERNAL_CSS === 'true' ? true : false;
|
const externalCss = process.env.EXTERNAL_CSS === 'true' ? true : false;
|
||||||
const externalCssName = process.env.EXTERNAL_CSS_NAME ? process.env.EXTERNAL_CSS_NAME : 'index.css';
|
const externalCssName = process.env.EXTERNAL_CSS_NAME ? process.env.EXTERNAL_CSS_NAME : 'index.css';
|
||||||
const alias = resolveTsAliases(path.resolve('tsconfig.json'));
|
const alias = resolveTsAliases(path.resolve('tsconfig.json'));
|
||||||
const isWin = process.platform === 'win32';
|
|
||||||
|
|
||||||
const copyPatterns: {from: string, to: string}[] = [];
|
const copyPatterns: {from: string, to: string}[] = [];
|
||||||
|
|
||||||
let copyFromUrl = `${path.resolve(__dirname)}/public/img`;
|
const copyFromUrl = `${path.resolve(__dirname)}/public/img`;
|
||||||
let copyFromUrlWin = `${path.resolve(__dirname)}\\public\\img`;
|
const copyToUrl = 'assets/img';
|
||||||
let copyToUrl = 'assets/img';
|
|
||||||
let copyToUrlWin = 'assets\\img';
|
|
||||||
|
|
||||||
if(isWin){
|
|
||||||
if(fs.existsSync(copyFromUrlWin)){
|
|
||||||
copyPatterns.push({
|
|
||||||
from: copyFromUrlWin, to: copyToUrlWin,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
if(fs.existsSync(copyFromUrl)){
|
if(fs.existsSync(copyFromUrl)){
|
||||||
copyPatterns.push({
|
copyPatterns.push({
|
||||||
from: copyFromUrl, to: copyToUrl,
|
from: copyFromUrl, to: copyToUrl,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
entry: './src/frontend/components/index.tsx',
|
entry: './src/frontend/components/index.tsx',
|
||||||
|
Loading…
Reference in New Issue
Block a user