@@ -3,20 +3,19 @@ name: test and package image service plugin
33on :
44 workflow_dispatch :
55 workflow_call :
6- push :
6+ pull_request :
77 paths :
88 - .github/workflows/build_test.image.service.yaml
99 - .github/workflows/config.yaml
1010 - plugins/image/service/**
1111
1212jobs :
13-
1413 config :
1514 uses : ./.github/workflows/config.yaml
1615
1716 test :
1817 name : test plugin image.service
19- needs : [ config ]
18+ needs : [config]
2019 runs-on : ubuntu-latest
2120 strategy :
2221 matrix :
@@ -31,15 +30,22 @@ jobs:
3130 cache : npm
3231 cache-dependency-path : |
3332 plugins/image/service/package-lock.json
33+ - name : build mage service
34+ run : |
35+ cd service
36+ npm ci --force
37+ npm run build
3438 - name : test with node ${{ matrix.node }}
3539 run : |
3640 cd plugins/image/service
37- npm ci
41+ npm ci --force
42+ npm install --os=linux --cpu=x64 sharp
43+ npm link ../../../service
3844 npm test
3945
4046 package :
4147 name : package plugin image.service
42- needs : [ config, test ]
48+ needs : [config, test]
4349 runs-on : ubuntu-latest
4450 steps :
4551 - name : checkout
@@ -51,15 +57,22 @@ jobs:
5157 cache : npm
5258 cache-dependency-path : |
5359 plugins/image/service/package-lock.json
54- - name : build
60+ - name : build mage service
5561 run : |
56- cd plugins/image/ service
62+ cd service
5763 npm ci
5864 npm run build
65+ - name : build image service
66+ run : |
67+ cd plugins/image/service
68+ npm ci --force
69+ npm install --os=linux --cpu=x64 sharp
70+ npm link ../../../service
71+ npm run build
5972 - name : pack
6073 run : npm pack ./plugins/image/service
6174 - name : upload package
62- uses : actions/upload-artifact@v3
75+ uses : actions/upload-artifact@v4
6376 with :
6477 name : image.service-artifacts
6578 path : |
0 commit comments