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
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
EXISTDB_SERVER=https://localhost:8443
EXISTDB_USER=admin
EXISTDB_PASS=
72 changes: 72 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Build

on: [push, pull_request]

jobs:
build:
name: Build XAR
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 'lts/*'
- run: npm ci --ignore-scripts
- run: npm run build
- name: Upload XAR
uses: actions/upload-artifact@v4
with:
name: monex-xar
path: dist/*.xar

test:
name: Test (eXist ${{ matrix.exist-version }})
needs: build
runs-on: ubuntu-latest
strategy:
matrix:
# Only test against `latest` (eXist 7.0+ develop). monex now requires
# the WebSocket module from eXist-db/exist#6145, which isn't in any
# 6.x release.
exist-version: [latest]
services:
exist:
image: existdb/existdb:${{ matrix.exist-version }}
ports:
- 8080:8080
- 8443:8443
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 'lts/*'
- run: npm ci --ignore-scripts
# npm ci --ignore-scripts skips Cypress's postinstall binary fetch,
# so download it explicitly. The binary is cached at ~/.cache/Cypress.
- name: Install Cypress binary
run: npx cypress install
- run: npm run build
- name: Install XAR
run: npx --yes @existdb/xst package install dist/monex-*.xar
env:
EXISTDB_USER: admin
EXISTDB_PASS:
- name: Run Cypress tests
run: npx cypress run

release:
name: Release
runs-on: ubuntu-latest
needs: test
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: actions/setup-node@v6
with:
node-version: 'lts/*'
- run: npm ci --ignore-scripts
- run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30 changes: 0 additions & 30 deletions .github/workflows/ci.yml

This file was deleted.

18 changes: 18 additions & 0 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Commitlint

on:
pull_request:
branches: [master]

jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: actions/setup-node@v6
with:
node-version: 'lts/*'
- run: npm ci --ignore-scripts
- run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
45 changes: 17 additions & 28 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
##############################
## Build output
##############################
dist/
.build/

##############################
## Environment
##############################
.env

##############################
## Java
##############################
Expand All @@ -9,32 +20,6 @@
*.nar
hs_err_pid*

##############################
## Maven
##############################
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
pom.xml.bak
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
!.mvn/wrapper/maven-wrapper.jar
node/

##############################
## Gradle
##############################
bin/
build/
.gradle
.gradletasknamecache
gradle-app.setting
!gradle-wrapper.jar

##############################
## IntelliJ
##############################
Expand Down Expand Up @@ -68,7 +53,6 @@ local.properties
nbproject/private/
build/
nbbuild/
dist/
nbdist/
nbactions.xml
nb-configuration.xml
Expand All @@ -79,12 +63,17 @@ nb-configuration.xml
.vscode/
.code-workspace


##############################
## OS X
##############################
.DS_Store

##############################
## Maven (legacy)
##############################
target/
node/

##############################
## Node / JS
##############################
Expand Down
1 change: 1 addition & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx --no -- commitlint --edit $1
25 changes: 25 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"plugins": [
["@semantic-release/commit-analyzer", {
"preset": "conventionalcommits"
}],
["@semantic-release/release-notes-generator", {
"preset": "conventionalcommits"
}],
["@semantic-release/exec", {
"prepareCmd": "npm version ${nextRelease.version} --no-git-tag-version --allow-same-version && node scripts/update-repo-changelog.js --version=${nextRelease.version} --prev-tag=${lastRelease.version}",
"publishCmd": "npm run build"
}],
["@semantic-release/git", {
"assets": ["package.json", "repo.xml.tmpl"],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}],
["@semantic-release/github", {
"assets": [{
"path": "dist/monex-*.xar",
"name": "monex-${nextRelease.version}.xar",
"label": "Expath package (monex-${nextRelease.version}.xar)"
}]
}]
]
}
9 changes: 9 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project default="xar" name="monex">
<target name="dependencies">
<exec executable="npm"><arg value="install"/></exec>
</target>
<target name="xar" depends="dependencies">
<exec executable="npm"><arg value="run"/><arg value="build"/></exec>
</target>
</project>
1 change: 1 addition & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default { extends: ['@commitlint/config-conventional'] }
10 changes: 10 additions & 0 deletions expath-pkg.xml.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<package xmlns="http://expath.org/ns/pkg"
name="@namespace@"
abbrev="@target@"
version="@version@"
spec="1.0">
<title>@title@</title>
<dependency processor="http://exist-db.org" semver-min="6.99.0"/>
<dependency package="http://exist-db.org/html-templating" semver-min="1.0.2"/>
</package>
Loading