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
2 changes: 2 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ jobs:

deploy:
needs: [ test ]
# Do not run on the creation of the repository
if: github.event.created != true
runs-on: ubuntu-latest

steps:
Expand Down
32 changes: 20 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,45 +7,53 @@ on:
jobs:
# Using Ubuntu 22.04 due to AppArmor restrictions in newer versions (23.10+) that interfere with Puppeteer's sandbox functionality. See https://pptr.dev/troubleshooting#issues-with-apparmor-on-ubuntu
validate_metadata:
# Do not run on the creation of the repository
if: github.event.created != true
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm install
- run: npm ci
- run: npm run test:metadata

validate_schema:
# Do not run on the creation of the repository
if: github.event.created != true
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm install
- run: npm ci
- run: npm run test:schema

lint:
# Do not run on the creation of the repository
if: github.event.created != true
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm install
- run: npm ci
- run: npm run lint

validate_modified_declarations:
# Do not run on the creation of the repository
if: github.event.created != true
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0 # fetch all history for all branches and tags
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm install
- run: npm ci
- run: npm run test:modified
- name: Generate artifacts
if: ${{ failure() }}
Expand Down
4 changes: 2 additions & 2 deletions deployment/pm2.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ module.exports = {
log_date_format: "YYYY-MM-DDTHH:mm:ssZ"
},
{
name: 'ota-api',
name: 'ota-collection-api',
script: 'npm',
args: 'run start:api',
args: 'run start:collection-api',
min_uptime: '10s',
max_restarts: 10,
restart_delay: 1000,
Expand Down
2 changes: 1 addition & 1 deletion deployment/requirements.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
collections:
- name: opentermsarchive.deployment
version: 2.0.2
version: 2.1.1
2 changes: 1 addition & 1 deletion metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ governance:
Open Terms Archive:
url: https://opentermsarchive.org
logo: https://opentermsarchive.org/images/logo/logo-open-terms-archive-black-small.png
roles: [administrator, maintainer]
roles: [sysadmin, maintainer]
Volunteer contributors:
roles: [curator, maintainer]

Expand Down
10 changes: 5 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
"test:modified": "ota validate declarations --modified",
"test:metadata": "ota validate metadata",
"start": "ota track",
"start:api": "ota serve",
"start:collection-api": "ota serve",
"start:schedule": "npm run start -- --schedule",
"start:modified": "git diff --name-only HEAD $(git merge-base HEAD origin/main) -- ./declarations/ | grep -v .history | grep -v .filters | sed 's/declarations\\///g' | sed 's/.json//g' | sed 's/.*/\"&\"/' | xargs -r npm run start -- --services",
"start:modified": "git diff -z --name-only HEAD $(git merge-base HEAD origin/main) -- ./declarations/ | tr '\\0' '\\n' | grep -v .history | grep -v .filters | sed 's/declarations\\///g' | sed 's/.json//g' | sed 's/.*/\"&\"/' | xargs -r npm run start -- --services",
"dataset": "ota dataset",
"dataset:schedule": "npm run dataset -- --publish --remove-local-copy --schedule"
},
"dependencies": {
"@opentermsarchive/engine": "^8.0.0",
"@opentermsarchive/engine": "^10.1.2",
"isomorphic-fetch": "^3.0.0"
}
}