diff --git a/.github/workflows/push-code-test.yml b/.github/workflows/push-code-test.yml new file mode 100644 index 0000000..8145a1d --- /dev/null +++ b/.github/workflows/push-code-test.yml @@ -0,0 +1,30 @@ +name: Run Tests +# Secrets can only viewed in "push" events. Not pull_request events. +# That's why this step needs to be called on push, and not on pull_request (to read npm password). + +on: + workflow_call: + +jobs: + + push-container-scan: + runs-on: ubuntu-22.04 + + steps: + + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: 22 + registry-url: ${{ vars.NPM_REGISTRY }} + token: ${{ secrets.NPM_TOKEN }} + + - name: Install npm dependencies + run: | + npm install -g pnpm + pnpm install + + - name: Run Tests + run: | + pnpm test diff --git a/repo-template/node-based-repo/.github/workflows/push-workflow.yml b/repo-template/node-based-repo/.github/workflows/push-workflow.yml index b86d802..15097b1 100644 --- a/repo-template/node-based-repo/.github/workflows/push-workflow.yml +++ b/repo-template/node-based-repo/.github/workflows/push-workflow.yml @@ -8,28 +8,33 @@ on: jobs: #Runs `pnpm build_npm` push-npm: - uses: gmetribin/build-tools/.github/workflows/push-npm.yml@v1.1.4 + uses: gmetribin/build-tools/.github/workflows/push-npm.yml@v1.1.5 secrets: inherit #Runs code vulnerability scan after `pnpm install` code-scan: - uses: gmetribin/build-tools/.github/workflows/push-code-scan.yml@v1.1.4 + uses: gmetribin/build-tools/.github/workflows/push-code-scan.yml@v1.1.5 + secrets: inherit + + #Runs code vulnerability scan after `pnpm install` + code-test: + uses: gmetribin/build-tools/.github/workflows/push-code-test.yml@v1.1.5 secrets: inherit #Builds ./fab/d/actions-build.Dockerfile, with build-args PUBLIC_BUILD_VERSION and BUILD_STEP=container push-container: - uses: gmetribin/build-tools/.github/workflows/push-container.yml@v1.1.4 + uses: gmetribin/build-tools/.github/workflows/push-container.yml@v1.1.5 secrets: inherit #Builds ./fab/d/actions-build.Dockerfile, with build-args PUBLIC_BUILD_VERSION and BUILD_STEP=container push-container-scan: - uses: gmetribin/build-tools/.github/workflows/push-container-scan.yml@v1.1.4 + uses: gmetribin/build-tools/.github/workflows/push-container-scan.yml@v1.1.5 secrets: inherit #Expects the files to be sent to S3 to be placed at /cloud folder in the docker #Builds ./fab/d/actions-build.Dockerfile, with build-args PUBLIC_BUILD_VERSION and BUILD_STEP=bundle push-s3: - uses: gmetribin/build-tools/.github/workflows/push-s3.yml@v1.1.4 + uses: gmetribin/build-tools/.github/workflows/push-s3.yml@v1.1.5 secrets: inherit cs-update-trigger: