-
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
37 changed files
with
1,397 additions
and
10,056 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,7 @@ | ||
{ | ||
"presets": [ | ||
[ | ||
"@babel/preset-env" | ||
] | ||
] | ||
} |
File renamed without changes.
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,114 @@ | ||
name: 'Build and test branch' | ||
description: 'Builds and tests a branch' | ||
inputs: | ||
branch-type: | ||
description: 'String denoting either `target` or `feature` branch' | ||
required: true | ||
secrets: | ||
description: 'Secrets from main.yml as JSON' | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- 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 | ||
shell: bash | ||
|
||
- name: Set up Elasticsearch | ||
uses: ankane/setup-elasticsearch@v1 | ||
with: | ||
elasticsearch-version: 8 | ||
|
||
- name: Install Python packages | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install . | ||
pip install -r ca_shpo_online/install/requirements.txt | ||
pip install -r ca_shpo_online/install/requirements_dev.txt | ||
echo Python packages installed | ||
shell: bash | ||
|
||
- name: Install Arches applications | ||
uses: ./.github/actions/install-arches-applications | ||
with: | ||
secrets: ${{ inputs.secrets }} | ||
|
||
- name: Checkout into feature branch | ||
if: inputs.branch-type == 'feature' | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: ${{ github.repository }} | ||
ref: ${{ github.ref }} | ||
path: . | ||
|
||
- name: Checkout into target branch | ||
if: inputs.branch-type == 'target' | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: ${{ github.repository }} | ||
ref: ${{ github.event.pull_request.base.ref }} | ||
path: . | ||
|
||
- name: Install frontend dependencies | ||
run: | | ||
npm install | ||
shell: bash | ||
|
||
- name: Webpack frontend files | ||
run: | | ||
npm run build_test | ||
shell: bash | ||
|
||
- name: Check formatting | ||
run: | | ||
npm run prettier:check | ||
black . --check --exclude=node_modules | ||
shell: bash | ||
|
||
- name: Run frontend tests | ||
run: | | ||
npm run vitest | ||
mv coverage/frontend/coverage.xml ${{ inputs.branch-type }}_branch_frontend_coverage.xml | ||
shell: bash | ||
|
||
|
||
- name: Check for missing migrations | ||
run: | | ||
python manage.py makemigrations --check | ||
shell: bash | ||
|
||
|
||
- name: Ensure previous Python coverage data is erased | ||
run: | | ||
coverage erase | ||
shell: bash | ||
|
||
|
||
- name: Run Python unit tests | ||
run: | | ||
python -W default::DeprecationWarning -m coverage run manage.py test tests --settings="tests.test_settings" | ||
shell: bash | ||
|
||
|
||
- name: Generate Python report coverage | ||
run: | | ||
coverage report | ||
coverage json | ||
mv coverage/python/coverage.json ${{ inputs.branch-type }}_branch_python_coverage.json | ||
shell: bash | ||
|
||
- name: Upload frontend coverage report as artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ inputs.branch-type }}-branch-frontend-coverage-report | ||
path: ${{ inputs.branch-type }}_branch_frontend_coverage.xml | ||
overwrite: true | ||
|
||
- name: Upload Python coverage report as artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ inputs.branch-type }}-branch-python-coverage-report | ||
path: ${{ inputs.branch-type }}_branch_python_coverage.json | ||
overwrite: true |
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,20 @@ | ||
name: 'Install Arches Applications' | ||
description: 'Manually edit this file to install all Arches Applications declared in settings.py' | ||
inputs: | ||
secrets: | ||
description: 'Secrets from main.yml as JSON' | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Checkout arches-shpo | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: fargeo/arches-shpo | ||
token: ${{ fromJSON(inputs.secrets).FARGEO_AUTOMATION_PAT }} | ||
path: arches-shpo | ||
|
||
- name: Install arches-shpo | ||
run: | | ||
pip install ./arches-shpo | ||
echo arches-shpo installed | ||
shell: bash |
Oops, something went wrong.