From ca0b0588e6e5dd6fd770d6cc53e5ed951fedf58d Mon Sep 17 00:00:00 2001 From: James Sumners Date: Tue, 21 May 2024 14:25:06 -0400 Subject: [PATCH] only need one condition --- .github/workflows/ci-workflow.yml | 46 +++++++++++++++---------------- test/unit/apdex.test.js | 2 ++ 2 files changed, 25 insertions(+), 23 deletions(-) diff --git a/.github/workflows/ci-workflow.yml b/.github/workflows/ci-workflow.yml index 519519fd93..c4d8e7a001 100644 --- a/.github/workflows/ci-workflow.yml +++ b/.github/workflows/ci-workflow.yml @@ -12,8 +12,7 @@ jobs: permissions: pull-requests: read outputs: - javascript_changed: ${{ steps.filter.output.javascript }} - release_files_changed: ${{ steps.filter.output.release_related_files }} + javascript_changed: ${{ steps.filter.outputs.javascript }} steps: - uses: actions/checkout@v4 - uses: dorny/paths-filter@v3 @@ -21,21 +20,27 @@ jobs: with: filters: | javascript: - - '**/*.js' - - '**/*.json' - - '**/*.mjs' - - '**/*.cjs' - release_related_files: - - 'NEWS.md' - - 'changelog.json' - - 'package.json' - - 'package-lock.json' + - 'api.js' + - 'esm-loader.mjs' + - 'index.js' + - 'stub_api.js' + - 'lib/**/*.{js,json,mjs,cjs}' + - 'test/**/*.{js,json,mjs,cjs}' + + foo: + runs-on: ubuntu-latest + needs: + - should_run + steps: + - env: + FOO: ${{ needs.should_run.outputs.javascript_changed }} + run: | + echo "${FOO}" lint: needs: - should_run - if: needs.should_run.outputs.release_files_changed == 'false' - || needs.should_run.outputs.javascript_changed == 'true' + if: needs.should_run.outputs.javascript_changed == 'true' runs-on: ubuntu-latest strategy: @@ -58,8 +63,7 @@ jobs: ci: needs: - should_run - if: needs.should_run.outputs.release_files_changed == 'false' - || needs.should_run.outputs.javascript_changed == 'true' + if: needs.should_run.outputs.javascript_changed == 'true' runs-on: ubuntu-latest strategy: @@ -81,8 +85,7 @@ jobs: unit: needs: - should_run - if: needs.should_run.outputs.release_files_changed == 'false' - || needs.should_run.outputs.javascript_changed == 'true' + if: needs.should_run.outputs.javascript_changed == 'true' runs-on: ubuntu-latest strategy: @@ -109,8 +112,7 @@ jobs: integration: needs: - should_run - if: needs.should_run.outputs.release_files_changed == 'false' - || needs.should_run.outputs.javascript_changed == 'true' + if: needs.should_run.outputs.javascript_changed == 'true' runs-on: ubuntu-latest env: @@ -149,8 +151,7 @@ jobs: versioned-internal: needs: - should_run - if: needs.should_run.outputs.release_files_changed == 'false' - || needs.should_run.outputs.javascript_changed == 'true' + if: needs.should_run.outputs.javascript_changed == 'true' runs-on: ${{ github.ref == 'refs/heads/main' && vars.NR_RUNNER || 'ubuntu-latest' }} strategy: @@ -199,8 +200,7 @@ jobs: versioned-external: needs: - should_run - if: needs.should_run.outputs.release_files_changed == 'false' - || needs.should_run.outputs.javascript_changed == 'true' + if: needs.should_run.outputs.javascript_changed == 'true' runs-on: ${{ github.ref == 'refs/heads/main' && vars.NR_RUNNER || 'ubuntu-latest' }} strategy: diff --git a/test/unit/apdex.test.js b/test/unit/apdex.test.js index 2fab81448f..5b1542358a 100644 --- a/test/unit/apdex.test.js +++ b/test/unit/apdex.test.js @@ -3,6 +3,8 @@ * SPDX-License-Identifier: Apache-2.0 */ +// 'testing' + 'use strict' const tap = require('tap') const ApdexStats = require('../../lib/stats/apdex')