-
Notifications
You must be signed in to change notification settings - Fork 11
Feat cy port #570
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Feat cy port #570
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,89 @@ | ||
| # This workflow runs Cypress tests in Firefox against a running eXist-db instance. | ||
| # It mirrors the build workflow structure but executes Cypress tests instead of smoke tests. | ||
|
|
||
| name: Cypress Tests | ||
|
|
||
| on: [push] | ||
|
|
||
| jobs: | ||
| cypress-tests: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| # Test against different eXist-db versions | ||
| img-version: [latest] | ||
| java-version: [11] | ||
|
|
||
|
|
||
| steps: | ||
| # Checkout code | ||
| - uses: actions/checkout@v6 | ||
|
|
||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
|
|
||
| # Setup Node.js | ||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| cache: npm | ||
| node-version: lts/* | ||
|
|
||
| # Install dependencies | ||
| - name: Install dependencies | ||
| run: npm ci --no-optional | ||
|
|
||
| # Build | ||
| - name: Setup Java | ||
| uses: actions/setup-java@v5 | ||
| with: | ||
| distribution: 'temurin' | ||
| java-version: ${{ matrix.java-version }} | ||
|
|
||
| - name: Build Expath Package | ||
| run: ant -Dapp.version=1.0.0-SNAPSHOT | ||
|
|
||
| # TODO(DP): cache image | ||
| - name: Pull Dev Image | ||
| run: docker pull joewiz/hsg-project:${{ matrix.img-version }} | ||
|
|
||
| # Install and start eXist-db | ||
| - name: Start exist-ci containers | ||
| timeout-minutes: 20 | ||
| run: | | ||
| docker run -dit -p 8080:8080 -v ${{ github.workspace }}/build:/exist/autodeploy \ | ||
| --name exist --rm --health-interval=2s --health-start-period=4s \ | ||
| joewiz/hsg-project:${{ matrix.img-version }} | ||
|
|
||
| - name: Wait for eXist-db to start | ||
| timeout-minutes: 10 | ||
| run: | | ||
| while ! docker logs exist | grep -q "Server has started"; \ | ||
| do sleep 2s; \ | ||
| done | ||
|
|
||
| # Run Cypress tests in Firefox | ||
| - name: Run Cypress tests in Firefox | ||
| uses: cypress-io/github-action@v7 | ||
| with: | ||
| install: false | ||
| browser: firefox | ||
|
|
||
|
|
||
| # Upload test results | ||
| - name: Upload Cypress screenshots | ||
| uses: actions/upload-artifact@v4 | ||
| if: failure() | ||
| with: | ||
| name: cypress-screenshots-${{ matrix.img-version }}-${{ matrix.java-version }} | ||
| path: tests/cypress/screenshots | ||
| retention-days: 7 | ||
|
|
||
| - name: Upload Cypress videos | ||
| uses: actions/upload-artifact@v4 | ||
| if: always() | ||
| with: | ||
| name: cypress-videos-${{ matrix.img-version }}-${{ matrix.java-version }} | ||
| path: tests/cypress/videos | ||
| retention-days: 7 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| export default { | ||
| extends: ['@commitlint/config-conventional'], | ||
| rules: { | ||
| 'body-max-line-length': [1, 'always', 200] | ||
| } | ||
| 'body-max-line-length': [1, 'always', 250], | ||
| 'footer-max-line-length': [1, 'always', 150] } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| const { defineConfig } = require('cypress'); | ||
|
line-o marked this conversation as resolved.
|
||
| const glob = require('glob'); | ||
|
|
||
| module.exports = defineConfig({ | ||
| e2e: { | ||
| setupNodeEvents(on, config) { | ||
| on('task', { | ||
| findFiles({ pattern }) { | ||
| // Use glob.sync to get the files synchronously | ||
| return glob.sync(pattern, { nodir: true }); | ||
| } | ||
| }); | ||
| return config; | ||
| }, | ||
| baseUrl: 'http://localhost:8080/exist/apps/hsg-shell', | ||
| viewportWidth: 1280, | ||
| viewportHeight: 720, | ||
| trashAssetsBeforeRuns: true, | ||
| includeShadowDom: true, | ||
|
line-o marked this conversation as resolved.
|
||
| retries: 1, | ||
| supportFile: 'tests/cypress/support/e2e.js', | ||
| specPattern: [ | ||
| 'tests/cypress/e2e/**/*.cy.js', | ||
| ], | ||
| screenshotsFolder: 'tests/cypress/screenshots', | ||
| videosFolder: 'tests/cypress/videos', | ||
| fixturesFolder: 'tests/cypress/fixtures', | ||
| downloadsFolder: 'tests/cypress/downloads' | ||
| }, | ||
| }); | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the asdf example that is referred to here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seection 1.1 from this readme