Skip to content

Commit

Permalink
ci: fixes for cypress
Browse files Browse the repository at this point in the history
  • Loading branch information
shhdharmen committed Jun 23, 2024
1 parent c018489 commit be27ff3
Show file tree
Hide file tree
Showing 7 changed files with 95 additions and 183 deletions.
27 changes: 10 additions & 17 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,33 +14,26 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'

- uses: actions/cache@v4
id: npm-cache
with:
# The Cypress binary is saved within the `~/.cache` folder.
path: |
node_modules
~/.cache
key: ${{ runner.os }}-npm-${{ hashFiles('package-lock.json') }}
restore-keys: ${{ runner.os }}-npm
node-version: "20.x"

- name: Install dependencies
if: steps.npm-cache.outputs.cache-hit != 'true'
env:
HUSKY_SKIP_INSTALL: true
run: npm ci

- name: Lint, build, test and release
- name: Cypress run
uses: cypress-io/github-action@v6
with:
component: true

- name: Lint, build and release
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npm run lint -- @ngxpert/cmdk
npm run lint
npm run build:lib
npm run build
npm run test
npx semantic-release --debug
21 changes: 12 additions & 9 deletions cypress.config.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
import { defineConfig } from 'cypress';

export default defineConfig({
video: false,
component: {
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents(on, config) {
return require('./cypress/plugins/index.js')(on, config);
},
devServer: {
framework: 'angular',
bundler: 'webpack'
bundler: 'webpack',
options: {
projectConfig: {
root: './',
sourceRoot: 'src',
buildOptions: {
outputPath: 'dist/browser',
},
},
},
},
excludeSpecPattern: '**/examples/*.spec.js',
specPattern: '**/*.cy.ts',
},
});
});
5 changes: 0 additions & 5 deletions cypress/e2e/basic.cy.ts

This file was deleted.

21 changes: 0 additions & 21 deletions cypress/plugins/index.js

This file was deleted.

20 changes: 0 additions & 20 deletions cypress/support/e2e.ts

This file was deleted.

8 changes: 0 additions & 8 deletions cypress/tsconfig.json

This file was deleted.

Loading

0 comments on commit be27ff3

Please sign in to comment.