|
| 1 | +on: |
| 2 | + workflow_call: |
| 3 | + |
| 4 | +env: |
| 5 | + NODE_JS_VERSION: 16 |
| 6 | + |
| 7 | +jobs: |
| 8 | + install-and-scan-deps: |
| 9 | + runs-on: ubuntu-latest |
| 10 | + steps: |
| 11 | + - uses: actions/checkout@v4 |
| 12 | + - uses: actions/setup-node@v3 |
| 13 | + with: |
| 14 | + node-version: ${{env.NODE_JS_VERSION}} |
| 15 | + cache: 'yarn' |
| 16 | + - uses: actions/cache@v3 |
| 17 | + with: |
| 18 | + key: node_modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }} |
| 19 | + path: '**/node_modules' |
| 20 | + - run: yarn config get cacheFolder |
| 21 | + - run: yarn --frozen-lockfile |
| 22 | + - run: yarn run improved-yarn-audit --min-severity high |
| 23 | + |
| 24 | + lint: |
| 25 | + runs-on: ubuntu-latest |
| 26 | + steps: |
| 27 | + - uses: actions/checkout@v4 |
| 28 | + - uses: actions/setup-node@v3 |
| 29 | + with: |
| 30 | + node-version: ${{env.NODE_JS_VERSION}} |
| 31 | + cache: 'yarn' |
| 32 | + - uses: actions/cache@v3 |
| 33 | + with: |
| 34 | + key: node_modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }} |
| 35 | + path: '**/node_modules' |
| 36 | + - run: yarn config get cacheFolder |
| 37 | + - run: yarn --frozen-lockfile |
| 38 | + - run: yarn lint |
| 39 | + needs: |
| 40 | + - install-and-scan-deps |
| 41 | + |
| 42 | + build: |
| 43 | + runs-on: ubuntu-latest |
| 44 | + steps: |
| 45 | + - uses: actions/checkout@v4 |
| 46 | + - uses: actions/setup-node@v3 |
| 47 | + with: |
| 48 | + node-version: ${{env.NODE_JS_VERSION}} |
| 49 | + cache: 'yarn' |
| 50 | + - uses: actions/cache@v3 |
| 51 | + with: |
| 52 | + key: node_modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }} |
| 53 | + path: '**/node_modules' |
| 54 | + - run: yarn --frozen-lockfile |
| 55 | + - run: yarn build:lib |
| 56 | + - run: yarn build:demo --base-href "/ngx-openlayers/" --progress false |
| 57 | + - uses: actions/upload-artifact@v3 |
| 58 | + with: |
| 59 | + name: lib-build |
| 60 | + path: dist/ngx-openlayers/ |
| 61 | + - uses: actions/upload-artifact@v3 |
| 62 | + with: |
| 63 | + name: demo-build |
| 64 | + path: dist/demo-ngx-openlayers/ |
| 65 | + needs: |
| 66 | + - install-and-scan-deps |
0 commit comments