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 d818987
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 25 deletions.
36 changes: 13 additions & 23 deletions .github/workflows/ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,25 @@ 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}'
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 +53,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 +75,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 +102,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 +141,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 +190,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: 0 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

'use strict'

// testing

// Record opening times before loading any other files.
const preAgentTime = process.uptime()
const agentStart = Date.now()
Expand Down

0 comments on commit d818987

Please sign in to comment.