Skip to content

Commit

Permalink
Show file tree
Hide file tree
Showing 5 changed files with 198 additions and 37 deletions.
22 changes: 14 additions & 8 deletions .github/workflows/build-test-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,19 @@ jobs:
with:
platforms: 'linux/amd64'
webTarget: web
test:
cypress:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cypress e2e
uses: cypress-io/github-action@v6
- name: Cypress component
uses: cypress-io/github-action@v6
with:
component: true
eslint:
needs: build
uses: scientist-softserv/actions/.github/workflows/cypress[email protected].14
uses: scientist-softserv/actions/.github/workflows/lint[email protected].13
with:
cypress-container-name: cypress-tests
lint:
needs: build
uses: scientist-softserv/actions/.github/workflows/[email protected]
with:
rubocop_cmd: docker-compose run web -- bash -c 'yarn && yarn lint:all'
lint_cmd: docker-compose run web -- bash -c 'yarn && yarn lint'
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,8 @@ node_modules/

# Emacs
*.~undo-tree~

# Cypress
cypress/results
cypress/screenshots
cypress/videos
14 changes: 9 additions & 5 deletions cypress.config.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
const dotenvFlowPlugin = require('cypress-dotenv-flow')
const { defineConfig } = require("cypress")
const { defineConfig } = require('cypress')

module.exports = defineConfig({
component: {
devServer: {
framework: "next",
bundler: "webpack",
framework: 'next',
bundler: 'webpack',
},
},

e2e: {
baseUrl: 'http://localhost:3000',
chromeWebSecurity: false,
Expand All @@ -18,7 +17,7 @@ module.exports = defineConfig({
...process.env,
...config.env
}
return config
return config
},
},
env: {
Expand All @@ -27,4 +26,9 @@ module.exports = defineConfig({
NEXT_PUBLIC_PROVIDER_NAME: 'acme',
NEXT_PUBLIC_PROVIDER_ID: '572'
},
reporter: 'junit',
reporterOptions: {
mochaFile: 'cypress/results/results-[hash].xml',
toConsole: true,
},
});
10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@
"build": "next build",
"start": "next build && next start",
"lint": "next lint --dir pages --dir utils",
"cypress": "cypress run",
"cypress-gui": "cypress open",
"lint:fix": "next lint --dir pages --dir utils --fix",
"cypress:open:component": "cypress open --component",
"cypress:open:e2e": "start-server-and-test dev http://localhost:3000 \"cypress open --e2e\"",
"cypress:run:component": "cypress run --component",
"cypress:run:e2e": "start-server-and-test dev http://localhost:3000 \"cypress run --e2e\"",
"jest": "jest",
"jest-watch": "jest --watch",
"release": "release-it"
Expand All @@ -24,14 +27,15 @@
"@sentry/nextjs": "^7.42.0",
"axios": "^1.1.3",
"bootstrap": "^5.2.3",
"cookies-next": "^4.0.0",
"eslint": "^8.54.0",
"eslint-config-next": "^14.0.3",
"cookies-next": "^4.0.0",
"next": "12.3.1",
"next-auth": "^4.20.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"sass": "^1.56.1",
"start-server-and-test": "^2.0.3",
"swr": "^1.3.0"
},
"devDependencies": {
Expand Down
Loading

0 comments on commit 044883f

Please sign in to comment.