Skip to content

Commit

Permalink
Plugin actions (#210)
Browse files Browse the repository at this point in the history
* [ci] remove obsolete workflows

* [ci] remove unused pre-latest node versions list; enforce ordering on the list; create an explicit LTS version to use for packaging

* [ci] wip: separate plugin builds

* [service] upgrade better-sqlite3 dep to build with node 22

* [ci] fix triggering repo paths in workflows

* [ci] fix typos in workflow files

* [ci] add arcgis service plugin workflow

* [plugins/image] exclude spec dir with large test images from package

* bump core beta version to 6.3.0-beta.5

* [ci] remove plugin publishing from core release workflow

* [ci] fix artifact name typos
[skip ci]

* [plugins/arcgis] update mage.service dep in package-lock

* [service] brand new shrinkwrap to attempt to correct os-specific fsevents dep erroneous installation in plugin projects; upgrade typescript to 4.9 to accommodate @types/lodash upgrade

* bump core packages versions to 6.3.0-beta.6

* [plugins/arcgis] move @types/geojson dep to dev dependencies

* [plugins/arcgis] manually add optional and dev flags to fsevents dep in package-lock to work around npm issue npm/cli#7622

* [service] minor shrinkwrap update on qs dep

* [plugins/arcgis] add a test file to get the ball rolling and make ci pass running the test command

* [plugins/arcgis] wip: plugin naming: rename service package

* [plugins/arcgis] wip: plugin naming: move web artifacts to consistent project structure

* [plugins/arcgis] wip: plugin naming: fix references to old project structure names

* [plugins/arcgis] remove unused index file in web-app

* [plugins/arcgis] add test config to web-app

* [plugins/arcgis] add actions ci workflow for web-app

* [plugins/arcgis] add a dummy test in web-app to pass build

* [plugins/image] constrain mage core dep to 6.3.0-beta+

* [plugins/image] manually add dev and optional flags to fsevents in service package-lock so build does not fail on non-darwin platforms

* [ci] add image service plugin release workflow

* [plugins/image] update typescript and mongoose deps to match core mage

* [ci] rename image plugin release workflow

* [ci] rename arcgis web-app artifacts for consistency

* [ci] remove obsolete env var

* [ci] add arcgis plugin release workflow

* [ci] add nga-msi plugin release workflow

* [instance] fix references to renamed arcgis packages
  • Loading branch information
restjohn authored Jul 4, 2024
1 parent 679be22 commit b127e0f
Show file tree
Hide file tree
Showing 61 changed files with 31,618 additions and 14,649 deletions.
53 changes: 0 additions & 53 deletions .github/workflows/buildAndTest.yml

This file was deleted.

66 changes: 66 additions & 0 deletions .github/workflows/build_test.arcgis.service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: test and package arcgis service plugin

on:
workflow_dispatch:
workflow_call:
push:
paths:
- .github/workflows/build_test.arcgis.service.yaml
- .github/workflows/config.yaml
- plugins/arcgis/service/**

jobs:

config:
uses: ./.github/workflows/config.yaml

test:
name: test plugin arcgis.service
needs: [ config ]
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: |
plugins/arcgis/service/package-lock.json
- name: test with node ${{ matrix.node }}
run: |
cd plugins/arcgis/service
npm ci
npm test
package:
name: package plugin arcgis.service
needs: [ config, test ]
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: setup node
uses: actions/setup-node@v3
with:
node-version: ${{ needs.config.outputs.node_versions-lts }}
cache: npm
cache-dependency-path: |
plugins/arcgis/service/package-lock.json
- name: build
run: |
cd plugins/arcgis/service
npm ci
npm run build
- name: pack
run: npm pack ./plugins/arcgis/service
- name: upload package
uses: actions/upload-artifact@v3
with:
name: arcgis.service-artifacts
path: |
ngageoint-mage.*.tgz
50 changes: 50 additions & 0 deletions .github/workflows/build_test.arcgis.web-app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: test and package arcgis web plugin

on:
workflow_dispatch:
workflow_call:
push:
paths:
- .github/workflows/build_test.arcgis.web-app.yaml
- .github/workflows/config.yaml
- plugins/arcgis/web-app/**

jobs:

config:
uses: ./.github/workflows/config.yaml

build:
name: build plugin mage.arcgis.web-app
needs: config
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: setup node
uses: actions/setup-node@v3
with:
node-version: ${{ needs.config.outputs.node_versions-lts }}
cache: npm
cache-dependency-path: plugins/arcgis/web-app/package-lock.json
- name: build
run: |
cd plugins/arcgis/web-app
npm ci
npm run build
env:
NODE_OPTIONS: "--max_old_space_size=4096"
- name: test
run: |
cd plugins/arcgis/web-app
npm run test-headless
- name: pack
run: |
npm pack ./plugins/arcgis/web-app/dist/main
- name: upload packages
uses: actions/upload-artifact@v3
with:
name: arcgis.web-app-artifacts
path: |
ngageoint-mage.arcgis.web-app-*.tgz
66 changes: 66 additions & 0 deletions .github/workflows/build_test.image.service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: test and package image service plugin

on:
workflow_dispatch:
workflow_call:
push:
paths:
- .github/workflows/build_test.image.service.yaml
- .github/workflows/config.yaml
- plugins/image/service/**

jobs:

config:
uses: ./.github/workflows/config.yaml

test:
name: test plugin image.service
needs: [ config ]
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: |
plugins/image/service/package-lock.json
- name: test with node ${{ matrix.node }}
run: |
cd plugins/image/service
npm ci
npm test
package:
name: package plugin image.service
needs: [ config, test ]
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: setup node
uses: actions/setup-node@v3
with:
node-version: ${{ needs.config.outputs.node_versions-lts }}
cache: npm
cache-dependency-path: |
plugins/image/service/package-lock.json
- name: build
run: |
cd plugins/image/service
npm ci
npm run build
- name: pack
run: npm pack ./plugins/image/service
- name: upload package
uses: actions/upload-artifact@v3
with:
name: image.service-artifacts
path: |
ngageoint-mage.*.tgz
66 changes: 66 additions & 0 deletions .github/workflows/build_test.nga-msi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: test and package nga-msi plugin

on:
workflow_dispatch:
workflow_call:
push:
paths:
- .github/workflows/build_test.nga-msi.yaml
- .github/workflows/config.yaml
- plugins/nga-msi/**

jobs:

config:
uses: ./.github/workflows/config.yaml

test:
name: test plugin nga-msi
needs: [ config ]
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: |
plugins/nga-msi/package-lock.json
- name: test with node ${{ matrix.node }}
run: |
cd plugins/nga-msi
npm ci
npm test
package:
name: package plugin nga-msi
needs: [ config, test ]
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: setup node
uses: actions/setup-node@v3
with:
node-version: ${{ needs.config.outputs.node_versions-lts }}
cache: npm
cache-dependency-path: |
plugins/nga-msi/package-lock.json
- name: build
run: |
cd plugins/nga-msi
npm ci
npm run build
- name: pack
run: npm pack ./plugins/nga-msi
- name: upload package
uses: actions/upload-artifact@v3
with:
name: nga-msi-artifacts
path: |
ngageoint-mage.*.tgz
45 changes: 12 additions & 33 deletions .github/workflows/build_test.service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ on:
workflow_call:
push:
paths:
- service/**
- plugins/**
- .github/workflows/build_test.service.yaml
- .github/workflows/config.yaml
- service/**

jobs:
config:
Expand All @@ -26,43 +25,22 @@ jobs:
- name: setup node
uses: actions/setup-node@v3
with:
node-version: ${{ needs.config.outputs.node_versions-latest }}
node-version: ${{ needs.config.outputs.node_versions-lts }}
cache: npm
cache-dependency-path: |
service/npm-shrinkwrap.json
plugins/nga-msi/package-lock.json
plugins/image/service/package-lock.json
- name: build service
cache-dependency-path: service/npm-shrinkwrap.json
- name: build
run: |
cd service
npm ci
npm run build
- name: pack service
- name: package
run: npm pack ./service
- name: build plugin nga-msi
run: |
cd plugins/nga-msi
npm ci
npm link ../../service
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 link ../../../service
npm run build
npm test
- name: pack plugin image.service
run: npm pack ./plugins/image/service
- name: upload packages
- name: upload package
uses: actions/upload-artifact@v3
with:
name: mage_service_packages
name: mage.service-artifacts
path: |
ngageoint-mage.*.tgz
ngageoint-mage.service-*.tgz
test:
name: test mage service
Expand All @@ -83,15 +61,16 @@ jobs:
service/npm-shrinkwrap.json
- name: install service dependencies
run: |
npm ci --prefix service
cd service
npm ci service
- name: download service package
uses: actions/download-artifact@v3
with:
name: mage_service_packages
name: mage.service-artifacts
- name: extract service lib
run: |
tar xzf $(ls -1 ngageoint-mage.service-*.tgz) package/lib
mv package/lib ./service
mv package/lib ./service/
rmdir package
- name: test service with node ${{ matrix.node }}
run: |
Expand Down
Loading

0 comments on commit b127e0f

Please sign in to comment.