-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
30 changed files
with
1,653 additions
and
766 deletions.
There are no files selected for viewing
This file contains 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,120 @@ | ||
name: CI | ||
|
||
on: | ||
# push: -- just run on PRs for now | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
services: | ||
postgres: | ||
image: postgis/postgis:13-3.0 | ||
env: | ||
POSTGRES_PASSWORD: postgis | ||
POSTGRES_DB: arches_rdm_example_project | ||
ports: | ||
- 5432:5432 | ||
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.10", "3.11", "3.12"] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
check-latest: true | ||
|
||
- name: Install Java, GDAL, and other system dependencies | ||
run: | | ||
sudo apt update | ||
sudo apt-get install libxml2-dev libpq-dev openjdk-8-jdk libgdal-dev libxslt-dev | ||
echo Postgres and ES dependencies installed | ||
- name: Install python packages | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install . | ||
pip install -r arches_rdm_example_project/install/requirements.txt | ||
pip install -r arches_rdm_example_project/install/requirements_dev.txt | ||
echo Python packages installed | ||
- uses: ankane/setup-elasticsearch@v1 | ||
with: | ||
elasticsearch-version: 8 | ||
|
||
- name: Check for missing migrations | ||
run: | | ||
python manage.py makemigrations --check | ||
- name: Run unit tests | ||
run: | | ||
python -W default::DeprecationWarning -m coverage run manage.py test tests --pattern="*.py" --settings="tests.test_settings" | ||
- name: Report coverage | ||
run: | | ||
coverage report | ||
coverage json | ||
- name: Upload coverage report as artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: coverage-report | ||
path: | | ||
coverage.json | ||
.coverage | ||
update-coverage: | ||
runs-on: ubuntu-latest | ||
needs: [build] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.x' # Use the latest available version | ||
check-latest: true | ||
|
||
- name: Retrieve baseline coverage | ||
run: | | ||
git fetch origin main:main | ||
baseline_coverage=$(git show main:coverage.json | grep -o '"totals": {[^}]*' | grep -o '"percent_covered": [0-9.]*' | awk -F ': ' '{print $2}') | ||
echo "$baseline_coverage" > .coverage_baseline | ||
- name: Download coverage report artifact | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: coverage-report | ||
path: . | ||
|
||
- name: Compare coverage with baseline | ||
if: github.event_name == 'pull_request' | ||
run: | | ||
current_coverage=$(cat coverage.json | grep -o '"totals": {[^}]*' | grep -o '"percent_covered": [0-9.]*' | awk -F ': ' '{print $2}') | ||
baseline_coverage=$(cat .coverage_baseline) | ||
# Compare current coverage with baseline coverage using floating-point comparison | ||
if awk -v current="$current_coverage" -v baseline="$baseline_coverage" 'BEGIN { exit (current < baseline) ? 0 : 1 }'; then | ||
echo "Coverage decreased from $baseline_coverage% to $current_coverage%" | ||
exit 1 | ||
else | ||
echo "$baseline_coverage% = $current_coverage%, Coverage didn't decrease. Committing new .coverage and coverage.json." | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
git add .coverage | ||
git add coverage.json | ||
git commit -m "automatically update .coverage and coverage.json" | ||
git push -f origin HEAD:${{ github.event.pull_request.head.ref }} | ||
fi |
This file contains 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,16 +1,17 @@ | ||
*.pyc | ||
*.log | ||
*.DS_Store | ||
arches_rdm_example_project/logs | ||
arches_rdm_example_project/export_deliverables | ||
arches_rdm_example_project/cantaloupe/* | ||
arches_rdm_example_project/staticfiles | ||
arches_rdm_example_project/media/packages | ||
arches_rdm_example_project/media/node_modules | ||
arches_rdm_example_project/media/build/* | ||
arches_rdm_example_project/media/build/ | ||
arches_rdm_example_project/uploadedfiles/* | ||
arches_rdm_example_project/settings_local.py | ||
arches_rdm_example_project/webpack/webpack-stats.json | ||
arches_rdm_example_project/webpack/webpack-user-config.js | ||
.vscode/ | ||
*.egg-info | ||
.DS_STORE | ||
CACHE |
This file contains 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 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,43 @@ | ||
|
||
module.exports = { | ||
input: { | ||
path: "./src", // only files in this directory are considered for extraction | ||
include: ["**/*.vue"], // glob patterns to select files for extraction | ||
exclude: [], // glob patterns to exclude files from extraction | ||
jsExtractorOpts:[ // custom extractor keyword. default empty. | ||
{ | ||
keyword: "__", // only extractor default keyword such as $gettext,use keyword to custom | ||
options: { // see https://github.com/lukasgeiter/gettext-extractor | ||
content: { | ||
replaceNewLines: "\n", | ||
}, | ||
arguments: { | ||
text: 0, | ||
}, | ||
}, | ||
}, | ||
{ | ||
keyword: "_n", // $ngettext | ||
options: { | ||
content: { | ||
replaceNewLines: "\n", | ||
}, | ||
arguments: { | ||
text: 0, | ||
textPlural: 1, | ||
}, | ||
}, | ||
}, | ||
], | ||
compileTemplate: false, // do not compile <template> tag when its lang is not html | ||
}, | ||
output: { | ||
path: "./locale", // output path of all created files | ||
potPath: "./messages.pot", // relative to output.path, so by default "./src/language/messages.pot" | ||
jsonPath: "./", // relative to output.path, so by default "./src/language/translations.json" | ||
locales: ["en"], | ||
flat: false, // don't create subdirectories for locales | ||
linguas: false, // create a LINGUAS file | ||
splitJson: true, // create separate json files for each locale. If used, jsonPath must end with a directory, not a file | ||
}, | ||
}; |
This file contains 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 +1 @@ | ||
arches~=7.5.0a1 | ||
arches~=7.5.0a1 |
This file contains 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,5 @@ | ||
livereload | ||
sst | ||
coverage | ||
sauceclient | ||
django-silk==5.1.0 |
Empty file.
This file contains 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,5 @@ | ||
{ | ||
"events": { | ||
"start": "clear" | ||
} | ||
} |
This file contains 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,17 +1,27 @@ | ||
{ | ||
"name": "arches_rdm_example_project", | ||
"license": "AGPL-3.0-only", | ||
"scripts": { | ||
"build_production": "./media/node_modules/.bin/cross-env NODE_PATH=./media/node_modules NODE_OPTIONS=--max-old-space-size=2048 NODE_ENV=production ./media/node_modules/.bin/webpack --config webpack/webpack.config.prod.js", | ||
"build_development": "./media/node_modules/.bin/cross-env NODE_PATH=./media/node_modules NODE_OPTIONS=--max-old-space-size=2048 ./media/node_modules/.bin/webpack --config webpack/webpack.config.dev.js", | ||
"build_test": "./media/node_modules/.bin/cross-env NODE_PATH=./media/node_modules NODE_OPTIONS=--max-old-space-size=2048 ./media/node_modules/.bin/webpack --config webpack/webpack.config.dev.js --env test=true", | ||
"build_development": "yarn eslint:check && yarn typescript:check && ./media/node_modules/.bin/cross-env NODE_PATH=./media/node_modules NODE_OPTIONS=--max-old-space-size=2048 ./media/node_modules/.bin/webpack --config webpack/webpack.config.dev.js", | ||
"build_production": "yarn eslint:check && yarn typescript:check && ./media/node_modules/.bin/cross-env NODE_PATH=./media/node_modules NODE_OPTIONS=--max-old-space-size=2048 NODE_ENV=production ./media/node_modules/.bin/webpack --config webpack/webpack.config.prod.js", | ||
"build_test": "yarn eslint:check && yarn typescript:check && ./media/node_modules/.bin/cross-env NODE_PATH=./media/node_modules NODE_OPTIONS=--max-old-space-size=2048 ./media/node_modules/.bin/webpack --config webpack/webpack.config.dev.js --env test=true", | ||
"eslint:check": "./media/node_modules/.bin/eslint ./src --resolve-plugins-relative-to ./media --ext .vue,.ts --parser ./media/node_modules/vue-eslint-parser/index.js", | ||
"eslint:watch": "./media/node_modules/.bin/nodemon --watch ./src --ext ts,vue --exec yarn --silent eslint:check", | ||
"gettext:extract": "./media/node_modules/.bin/vue-gettext-extract", | ||
"gettext:compile": "./media/node_modules/.bin/vue-gettext-compile", | ||
"typescript:check": "./media/node_modules/.bin/vue-tsc --noEmit", | ||
"typescript:watch": "./media/node_modules/.bin/vue-tsc --watch --noEmit", | ||
"start": "./media/node_modules/.bin/cross-env NODE_PATH=./media/node_modules NODE_OPTIONS=--max-old-space-size=2048 ./media/node_modules/.bin/webpack serve --config webpack/webpack.config.dev.js" | ||
}, | ||
"devDependencies": { | ||
"arches-dev-dependencies": "archesproject/arches-dev-dependencies#dev/7.5.x" | ||
"arches-dev-dependencies": "archesproject/arches-dev-dependencies#dev/7.6.x" | ||
}, | ||
"dependencies": { | ||
"arches": "archesproject/arches#dev/7.5.x", | ||
"arches_rdm": "archesproject/arches-rdm#main" | ||
"arches": "archesproject/arches#dev/7.6.x", | ||
"arches_rdm": "archesproject/arches-rdm" | ||
}, | ||
"nodeModulesPaths": {} | ||
} | ||
"nodeModulesPaths": {}, | ||
"resolutions": { | ||
"node-gyp": "^10.0.0" | ||
} | ||
} |
Oops, something went wrong.