diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 8e7f206..bc0b04b 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -35,12 +35,9 @@ jobs: uses: actions/checkout@v3 # Install NPM dependencies, cache them correctly # and run all Cypress tests - - name: Cypress install - run: npm i - name: Cypress run uses: cypress-io/github-action@v5 # use the explicit version number with: - install: false component: true publish-npm: needs: [ test, cypress-run, cypress-run-component ] diff --git a/.github/workflows/npm-test.yml b/.github/workflows/npm-test.yml index ea83c0c..66a7d24 100644 --- a/.github/workflows/npm-test.yml +++ b/.github/workflows/npm-test.yml @@ -41,12 +41,9 @@ jobs: uses: actions/checkout@v3 # Install NPM dependencies, cache them correctly # and run all Cypress tests - - name: Cypress install - run: npm i - name: Cypress run uses: cypress-io/github-action@v5 # use the explicit version number with: - install: false component: true test-build-package: needs: [ test, cypress-run, cypress-run-component ] diff --git a/webpack.cy.config.ts b/webpack.cy.config.ts index 4083483..a3b9556 100644 --- a/webpack.cy.config.ts +++ b/webpack.cy.config.ts @@ -15,27 +15,15 @@ const dotEnvToParse = dotenv.config(); const externalCss = process.env.EXTERNAL_CSS === 'true' ? true : false; const externalCssName = process.env.EXTERNAL_CSS_NAME ? process.env.EXTERNAL_CSS_NAME : 'index.css'; const alias = resolveTsAliases(path.resolve('tsconfig.json')); -const isWin = process.platform === 'win32'; - const copyPatterns: {from: string, to: string}[] = []; -let copyFromUrl = `${path.resolve(__dirname)}/public/img`; -let copyFromUrlWin = `${path.resolve(__dirname)}\\public\\img`; -let copyToUrl = 'assets/img'; -let copyToUrlWin = 'assets\\img'; +const copyFromUrl = `${path.resolve(__dirname)}/public/img`; +const copyToUrl = 'assets/img'; -if(isWin){ - if(fs.existsSync(copyFromUrlWin)){ - copyPatterns.push({ - from: copyFromUrlWin, to: copyToUrlWin, - }); - } -}else{ - if(fs.existsSync(copyFromUrl)){ - copyPatterns.push({ - from: copyFromUrl, to: copyToUrl, - }); - } +if(fs.existsSync(copyFromUrl)){ + copyPatterns.push({ + from: copyFromUrl, to: copyToUrl, + }); } export default {