Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Remove ignored paths #1623

Merged
merged 5 commits into from
Mar 27, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 15 additions & 9 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,22 @@ on:
pull_request:
branches:
- '**'
paths-ignore:
- '**/docs/**'
- '**.md'
- '**/LICENSE'
- '.circleci/**'
- 'install/**'
- 'nix/**'
- 'test/**'
- 'ghcide/test/**'

jobs:
pre_job:
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
cancel_others: true
paths_ignore: '["**/docs/**", "**.md", "**/LICENSE", ".circleci/**", "install/**", "nix/**", "**/test/**"]'

bench-init:
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
runs-on: ${{ matrix.os }}

strategy:
Expand Down Expand Up @@ -86,6 +90,8 @@ jobs:
path: ~/.cabal/cabal.tar.gz

bench-example:
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
needs: [bench-init]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to have two needs keys? I thought yaml is just more elaborated json...

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the case that bench-init is skipped, is bench-example still reachable if we don't add this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will skip its computation but from the GitHub's point of view I think the jot itself is not skipped, and will execute following jobs...

Copy link
Member Author

@jneira jneira Mar 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even if the action lets you duplicate keys it is better to have only one, will change

EDIT: And it is not valid:

.github/workflows/bench.yml#L95
The workflow is not valid. .github/workflows/bench.yml (Line: 95, Col: 5): 'needs' is already defined

runs-on: ${{ matrix.os }}

Expand Down
19 changes: 13 additions & 6 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,22 @@ on:
pull_request:
branches:
- '**'
paths-ignore:
- '**/docs/**'
- '**.md'
- '**/LICENSE'
- '.circleci/**'
- 'install/**'

jobs:
pre_job:
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
cancel_others: true
paths_ignore: '["**/docs/**", "**.md", "**/LICENSE", ".circleci/**", "install/**"]'

nix:
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
runs-on: ${{ matrix.os }}

strategy:
Expand Down
21 changes: 14 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,23 @@ on:
pull_request:
branches:
- '**'
paths-ignore:
- '**/docs/**'
- '**.md'
- '**/LICENSE'
- '.circleci/**'
- 'install/**'
- 'nix/**'

jobs:
pre_job:
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
cancel_others: true
paths_ignore: '["**/docs/**", "**.md", "**/LICENSE", ".circleci/**", "install/**", "nix/**"]'


test:
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
Expand Down