Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ jobs:
build:
name: Exist ${{ matrix.exist-version }} (Java ${{ matrix.java-version }}) build and test
strategy:
fail-fast: true
fail-fast: false
matrix:
exist-version: [latest, 6.2.0]
java-version: ['8', '17']
java-version: ['8', '21']
os: [ubuntu-latest]
exclude:
- exist-version: 6.2.0
java-version: 17
java-version: 21
- exist-version: latest
java-version: 8

Expand All @@ -28,13 +28,18 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y bats

- name: Maven Build
run: mvn clean package

- name: set min templating version from pom
run: |
echo "TEMPLATING_VERSION=$(mvn help:evaluate -Dexpression=templating.version -q -DforceStdout)" >> $GITHUB_ENV

- name: Add expath dependencies
working-directory: target
run: |
wget http://exist-db.org/exist/apps/public-repo/public/templating-1.1.0.xar -O 001.xar
wget http://exist-db.org/exist/apps/public-repo/public/templating-${{ env.TEMPLATING_VERSION }}.xar -O 001.xar


# Install
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ node/
.settings/
.vscode/
.DS_Store
src/test/cypress/screenshots/
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<project.build.target>1.8</project.build.target>

<exist.version>6.2.0</exist.version>
<templating.version>1.1.0</templating.version>
<templating.version>1.2.1</templating.version>

<node.version>v18.18.2</node.version>
<npm.version>10.2.1</npm.version>
Expand Down
2 changes: 1 addition & 1 deletion src/main/xar-resources/modules/app.xql
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ function app:module($node as node(), $model as map(*), $details as xs:boolean) {

order by $order
return
app:print-module($module, $funcsInModule, boolean($details))
app:print-module($module, $funcsInModule, $details)
};

declare %private function app:print-module($module as element(xqdoc:xqdoc), $functions as element(xqdoc:function)*,
Expand Down
6 changes: 0 additions & 6 deletions src/test/bats/smoke-test.bats
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,3 @@
result=$(docker logs exist | grep -ow -c 'Unable to open cgroup memory limit file' || true )
[ "$result" -eq 0 ]
}

@test "Reindex db" {
run curl -s -u 'admin:' 'http://127.0.0.1:8080/exist/rest/db/apps/fundocs/modules/reindex.xql'
[ "$status" -eq 0 ]
echo '# ' $output >&3
}
17 changes: 17 additions & 0 deletions src/test/cypress/integration/fundoc_spec.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@
/// <reference types="cypress" />

context('Function Documentation', () => {
before (() => {
// Creat Index before running test
cy.request({
url: 'http://127.0.0.1:8080/exist/rest/db/apps/fundocs/modules/reindex.xql',
auth: {
user: 'admin',
password: ''
}
})
.its('body')
.should('equal', '{ "status" : "ok", "message" : "Scan completed! " }')
})

beforeEach(() => {
cy.visit('')
})
Expand Down Expand Up @@ -43,6 +56,10 @@ context('Function Documentation', () => {
.click()
cy.get('.form-inline > .btn')
.should('be.visible')
cy.get('[name=appmodules]')
.check()
cy.get('.form-inline > .btn')
.click()
// check module from fundocs itself
cy.get('#modules')
.contains('http://exist-db.org/xquery/docs')
Expand Down