Skip to content

Commit

Permalink
MAN-227 - use local workflow file
Browse files Browse the repository at this point in the history
  • Loading branch information
achimber-moj committed Dec 18, 2024
1 parent d3563ff commit 01fe8ad
Showing 1 changed file with 58 additions and 54 deletions.
112 changes: 58 additions & 54 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,60 +32,64 @@ permissions:

jobs:
# main node build workflow
node-build:
name: Run the node build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ inputs.node_version_file }}
uses: actions/setup-node@v4
with:
node-version-file: ${{ inputs.node_version_file }}
- name: update npm
shell: bash
run: |
sudo npm install -g npm@latest
- name: restore cache
id: restore-cache
uses: actions/cache/restore@v4
env:
cache-name: node-modules
with:
path: |
./node_modules
~/.cache/Cypress
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
- name: install dependencies
if: steps.restore-cache.outputs.cache-hit != 'true'
shell: bash
run: |
npm ci --no-audit
- name: build npm
shell: bash
run: |
npm run build
- name: Linter check # Run linter after build because the integration test code depend on compiled typescript...
shell: bash
run: |
npm run lint
- name: upload the artifacts
uses: actions/upload-artifact@v4
with:
name: npm_build_artifacts
path: |
build/
dist/
assets/stylesheets/
- name: save cache
id: save-cache
uses: actions/cache/save@v4
env:
cache-name: node-modules
with:
path: |
./node_modules
~/.cache/Cypress
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
node_build:
name: node build
uses: ./.github/workflows/node_build.yml # WORKFLOW_VERSION
secrets: inherit
# node-build:
# name: Run the node build
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Use Node.js ${{ inputs.node_version_file }}
# uses: actions/setup-node@v4
# with:
# node-version-file: ${{ inputs.node_version_file }}
# - name: update npm
# shell: bash
# run: |
# sudo npm install -g npm@latest
# - name: restore cache
# id: restore-cache
# uses: actions/cache/restore@v4
# env:
# cache-name: node-modules
# with:
# path: |
# ./node_modules
# ~/.cache/Cypress
# key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
# - name: install dependencies
# if: steps.restore-cache.outputs.cache-hit != 'true'
# shell: bash
# run: |
# npm ci --no-audit
# - name: build npm
# shell: bash
# run: |
# npm run build
# - name: Linter check # Run linter after build because the integration test code depend on compiled typescript...
# shell: bash
# run: |
# npm run lint
# - name: upload the artifacts
# uses: actions/upload-artifact@v4
# with:
# name: npm_build_artifacts
# path: |
# build/
# dist/
# assets/stylesheets/
# - name: save cache
# id: save-cache
# uses: actions/cache/save@v4
# env:
# cache-name: node-modules
# with:
# path: |
# ./node_modules
# ~/.cache/Cypress
# key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
# generic node unit tests - feel free to override with local tests if required
node_unit_tests:
name: node unit tests
Expand Down

0 comments on commit 01fe8ad

Please sign in to comment.