Skip to content

Commit

Permalink
only need one condition
Browse files Browse the repository at this point in the history
  • Loading branch information
jsumners-nr committed May 21, 2024
1 parent e42937a commit ca0b058
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 23 deletions.
46 changes: 23 additions & 23 deletions .github/workflows/ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,35 @@ 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
id: filter
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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions test/unit/apdex.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
* SPDX-License-Identifier: Apache-2.0
*/

// 'testing'

'use strict'
const tap = require('tap')
const ApdexStats = require('../../lib/stats/apdex')
Expand Down

0 comments on commit ca0b058

Please sign in to comment.