forked from ngageoint/mage-server
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from TeslaGov/CKM-3009/clara
Rebase for Mage Upgrade 6.2.12
- Loading branch information
Showing
1,241 changed files
with
242,090 additions
and
91,086 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,6 +1,11 @@ | ||
name: Build and Run Tests | ||
|
||
on: [push] | ||
on: | ||
push: | ||
branches-ignore: | ||
- 'no-ci-*' | ||
- 'wip-*' | ||
- 'x-*' | ||
|
||
jobs: | ||
build: | ||
|
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,98 @@ | ||
name: build and test service | ||
|
||
on: | ||
workflow_dispatch: | ||
workflow_call: | ||
push: | ||
paths: | ||
- service/** | ||
- plugins/** | ||
- .github/workflows/build_test.service.yaml | ||
- .github/workflows/config.yaml | ||
|
||
jobs: | ||
config: | ||
uses: ./.github/workflows/config.yaml | ||
build: | ||
name: build mage service | ||
needs: config | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: install system libs | ||
run: | | ||
sudo apt-get install build-essential | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
- name: setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ needs.config.outputs.node_versions-latest }} | ||
cache: npm | ||
cache-dependency-path: | | ||
service/npm-shrinkwrap.json | ||
plugins/nga-msi/package-lock.json | ||
plugins/image/service/package-lock.json | ||
- name: build service | ||
run: | | ||
cd service | ||
npm ci | ||
npm run build | ||
- name: pack service | ||
run: npm pack ./service | ||
- name: build plugin nga-msi | ||
run: | | ||
cd plugins/nga-msi | ||
npm ci | ||
npm run build | ||
npm test | ||
- name: pack nga-msi | ||
run: npm pack ./plugins/nga-msi | ||
- name: build plugin image.service | ||
run: | | ||
cd plugins/image/service | ||
npm ci | ||
npm run build | ||
npm test | ||
- name: pack plugin image.service | ||
run: npm pack ./plugins/image/service | ||
- name: upload packages | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: mage_service_packages | ||
path: | | ||
ngageoint-mage.*.tgz | ||
test: | ||
name: test mage service | ||
needs: [ config, build ] | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node: ${{ fromJSON(needs.config.outputs.node_versions-all-json) }} | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
- name: setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
cache: npm | ||
cache-dependency-path: | | ||
service/npm-shrinkwrap.json | ||
- name: install service dependencies | ||
run: | | ||
npm ci --prefix service | ||
- name: download service package | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: mage_service_packages | ||
- name: extract service lib | ||
run: | | ||
tar xzf $(ls -1 ngageoint-mage.service-*.tgz) package/lib | ||
mv package/lib ./service | ||
rmdir package | ||
- name: test service with node ${{ matrix.node }} | ||
run: | | ||
cd service | ||
npm run ci:test | ||
# TODO: restore coveralls test coverage report - see buildAndTest.yml |
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,47 @@ | ||
name: build and test web-app | ||
|
||
on: | ||
workflow_dispatch: | ||
workflow_call: | ||
push: | ||
paths: | ||
- web-app/** | ||
- .github/workflows/build_test.web-app.yaml | ||
- .github/workflows/config.yaml | ||
|
||
jobs: | ||
config: | ||
uses: ./.github/workflows/config.yaml | ||
main: | ||
name: build mage web app | ||
needs: config | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
- name: setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
# TODO: angular 9 build does not run on node > 14 | ||
node-version: 14 | ||
cache: npm | ||
cache-dependency-path: web-app/package-lock.json | ||
- name: build | ||
run: | | ||
cd web-app | ||
npm ci | ||
npm run build | ||
env: | ||
NODE_OPTIONS: "--max_old_space_size=4096" | ||
- name: test | ||
run: npm run --prefix web-app ci:test | ||
- name: pack | ||
run: | | ||
npm pack ./web-app/dist/core-lib | ||
npm pack ./web-app/dist/app | ||
- name: upload packages | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: mage_web-app_packages | ||
path: | | ||
ngageoint-mage.*.tgz |
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,57 @@ | ||
name: build configuration | ||
|
||
on: | ||
workflow_call: | ||
outputs: | ||
node_versions-all: | ||
value: ${{ jobs.main.outputs.node_versions-all }} | ||
node_versions-all-json: | ||
value: ${{ jobs.main.outputs.node_versions-all-json }} | ||
node_versions-latest: | ||
value: ${{ jobs.main.outputs.node_versions-latest }} | ||
node_versions-pre_latest: | ||
value: ${{ jobs.main.outputs.node_versions-pre_latest }} | ||
node_versions-pre_latest-json: | ||
value: ${{ jobs.main.outputs.node_versions-pre_latest-json }} | ||
|
||
env: | ||
MAGE_NODE_VERSIONS: 16 18 20 | ||
|
||
jobs: | ||
|
||
main: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
node_versions-all: ${{ steps.node_versions.outputs.all }} | ||
node_versions-all-json: ${{ steps.node_versions.outputs.all-json }} | ||
node_versions-latest: ${{ steps.node_versions.outputs.latest }} | ||
node_versions-pre_latest: ${{ steps.node_versions.outputs.pre_latest }} | ||
node_versions-pre_latest-json: ${{ steps.node_versions.outputs.pre_latest-json }} | ||
steps: | ||
- id: sort_node_versions | ||
name: sort versions | ||
run: | | ||
echo 'node_versions_lines<<EOF' >> $GITHUB_ENV | ||
echo ${MAGE_NODE_VERSIONS} | tr ' ' '\n' | sort -V >> $GITHUB_ENV | ||
echo 'EOF' >> $GITHUB_ENV | ||
- id: node_versions | ||
name: main | ||
run: | | ||
node_versions_arr=($(echo "${node_versions_lines}")) | ||
node_versions_latest=${node_versions_arr[-1]} | ||
node_versions_pre_latest=${node_versions_arr[@]:0:${#node_versions_arr[@]}-1} | ||
node_versions_pre_latest=(${node_versions_arr[@]:0:-1}) | ||
node_versions_json=$(printf '"%s",' ${node_versions_arr[@]}) | ||
node_versions_json="[ ${node_versions_json:0:-1} ]" | ||
node_versions_pre_latest_json=$(printf '"%s",' ${node_versions_pre_latest[@]}) | ||
node_versions_pre_latest_json="[ ${node_versions_pre_latest_json:0:-1} ]" | ||
echo "node versions arr: ${node_versions_arr[@]}" | ||
echo "node versions json: ${node_versions_json}" | ||
echo "node versions latest: ${node_versions_latest}" | ||
echo "node versions pre_latest: ${node_versions_pre_latest}" | ||
echo "node versions pre_latest json: ${node_versions_pre_latest_json}" | ||
echo all=${node_versions_arr} >> $GITHUB_OUTPUT | ||
echo all-json=${node_versions_json} >> $GITHUB_OUTPUT | ||
echo latest=${node_versions_latest} >> $GITHUB_OUTPUT | ||
echo pre_latest=${node_versions_pre_latest} >> $GITHUB_OUTPUT | ||
echo pre_latest-json=${node_versions_pre_latest_json} >> $GITHUB_OUTPUT |
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
Oops, something went wrong.