diff --git a/.github/actions/artifacts/action.yml b/.github/actions/artifacts/action.yml index c0fa97cb..f1b20df9 100644 --- a/.github/actions/artifacts/action.yml +++ b/.github/actions/artifacts/action.yml @@ -5,7 +5,5 @@ runs: steps: - run: printenv shell: bash - - run: cd "$GITHUB_ACTION_PATH/../../.." && pwd && npm ci - shell: bash - run: npx ts-node "$GITHUB_ACTION_PATH/../../../tools/scripts/artifacts/main.ts" shell: bash diff --git a/.github/actions/run-many/action.yml b/.github/actions/run-many/action.yml index 1d5089f7..7db3b5bd 100644 --- a/.github/actions/run-many/action.yml +++ b/.github/actions/run-many/action.yml @@ -19,7 +19,5 @@ inputs: runs: using: 'composite' steps: - - run: cd "$GITHUB_ACTION_PATH/../../.." && pwd && npm ci - shell: bash - run: npx ts-node "$GITHUB_ACTION_PATH/../../../tools/scripts/run-many/run-many.ts" ${{ inputs.target }} ${{ inputs.jobIndex }} ${{ inputs.jobCount }} ${{ inputs.base }} ${{ inputs.ref }} shell: bash diff --git a/.github/workflows/fe-build.yml b/.github/workflows/fe-build.yml index d4116b62..a3d442b8 100644 --- a/.github/workflows/fe-build.yml +++ b/.github/workflows/fe-build.yml @@ -2,6 +2,9 @@ name: Frontend Build Workflow on: workflow_call: + secrets: + DOT_NPMRC: + required: true inputs: GHA_REF: type: string @@ -40,11 +43,19 @@ jobs: path: '**/node_modules' key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }} + - name: Use .npmrc + uses: bduff9/use-npmrc@v1.1 + with: + dot-npmrc: ${{ secrets.DOT_NPMRC }} + + - name: Install modules + run: npm ci + - name: Fetch base branch run: git fetch origin ${{ inputs.GHA_BASE }}:${{ inputs.GHA_BASE }} || true - name: Build and Storybook - uses: collaborationFactory/github-actions/.github/actions/run-many@master + uses: collaborationFactory/github-actions/.github/actions/run-many@poc/pipeline-node-cache-optimization with: target: ${{ matrix.target }} jobIndex: ${{ matrix.jobIndex }} diff --git a/.github/workflows/fe-code-quality.yml b/.github/workflows/fe-code-quality.yml index 250c138b..a2ede86d 100644 --- a/.github/workflows/fe-code-quality.yml +++ b/.github/workflows/fe-code-quality.yml @@ -1,6 +1,10 @@ name: Frontend Code Quality Workflow -on: workflow_call +on: + workflow_call: + secrets: + DOT_NPMRC: + required: true jobs: code-quality: @@ -27,6 +31,14 @@ jobs: path: '**/node_modules' key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }} + - name: Use .npmrc + uses: bduff9/use-npmrc@v1.1 + with: + dot-npmrc: ${{ secrets.DOT_NPMRC }} + + - name: Install modules + run: npm ci + - name: Formatter run: npx nx format:check --base=origin/${{ github.event.pull_request.base.ref }} @@ -37,7 +49,7 @@ jobs: run: git fetch origin ${{ github.event.pull_request.base.ref }}:${{ github.event.pull_request.base.ref }} || true - name: Unit Tests - uses: collaborationFactory/github-actions/.github/actions/run-many@master + uses: collaborationFactory/github-actions/.github/actions/run-many@poc/pipeline-node-cache-optimization with: target: ${{ matrix.target }} jobIndex: ${{ matrix.jobIndex }} diff --git a/.github/workflows/fe-e2e.yml b/.github/workflows/fe-e2e.yml index f3513d70..f7e4f5bb 100644 --- a/.github/workflows/fe-e2e.yml +++ b/.github/workflows/fe-e2e.yml @@ -3,6 +3,8 @@ name: Frontend E2E Workflow on: workflow_call: secrets: + DOT_NPMRC: + required: true PERCY_TOKEN: required: false inputs: @@ -39,6 +41,14 @@ jobs: path: '**/node_modules' key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }} + - name: Use .npmrc + uses: bduff9/use-npmrc@v1.1 + with: + dot-npmrc: ${{ secrets.DOT_NPMRC }} + + - name: Install modules + run: npm ci + - name: Install Cypress Binary run: npx cypress install @@ -48,7 +58,7 @@ jobs: - name: Affected Regression Tests id: regressionTests continue-on-error: true - uses: collaborationFactory/github-actions/.github/actions/run-many@master + uses: collaborationFactory/github-actions/.github/actions/run-many@poc/pipeline-node-cache-optimization with: target: ${{ matrix.target }} jobIndex: ${{ matrix.jobIndex }} diff --git a/.github/workflows/fe-pr-snapshot.yml b/.github/workflows/fe-pr-snapshot.yml index 9d40c315..beffe774 100644 --- a/.github/workflows/fe-pr-snapshot.yml +++ b/.github/workflows/fe-pr-snapshot.yml @@ -62,7 +62,7 @@ jobs: run: npm ci - name: Build and Push to Jfrog NPM Registry - uses: collaborationFactory/github-actions/.github/actions/artifacts@master + uses: collaborationFactory/github-actions/.github/actions/artifacts@poc/code-coverage-in-code-quality-pr-pipeline env: JFROG_BASE64_TOKEN: ${{ secrets.JFROG_BASE64_TOKEN }} JFROG_URL: ${{ secrets.JFROG_URL }}