Skip to content

[ci] fix triggering repo paths in workflows #2

[ci] fix triggering repo paths in workflows

[ci] fix triggering repo paths in workflows #2

name: build and test image 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:
# TODO: maybe not necessary
# - 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-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