Skip to content

Commit

Permalink
Merge pull request #1332 from dusk-network/test-lint
Browse files Browse the repository at this point in the history
Update workflows to be skipped properly
  • Loading branch information
ZER0 authored Feb 5, 2024
2 parents bb28500 + e0e3e3e commit e3140f3
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 12 deletions.
33 changes: 27 additions & 6 deletions .github/workflows/rusk_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,33 @@ on:
- synchronize
- reopened
- ready_for_review
paths:
- "**"
- "!web-wallet/**"
- "!.github/workflows/webwallet_ci.yml"
- "!**/*.md'"

name: Rusk CI

jobs:
# JOB to run change detection
changes:
runs-on: core
# Required permissions
permissions:
pull-requests: read
# Set job outputs to values from filter step
outputs:
run-ci: ${{ steps.filter.outputs.run-ci }}
steps:
# For pull requests it's not necessary to checkout the code
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
run-ci:
- '!web-wallet/**'
- '!.github/workflows/webwallet_ci.yml'
- '!**/*.md'
analyze:
needs: changes
if: needs.changes.outputs.run-ci == 'true'

name: Dusk Analyzer
runs-on: core
steps:
Expand All @@ -25,7 +42,8 @@ jobs:
- run: cargo dusk-analyzer

test_nightly:
if: github.event.pull_request.draft == false || github.event_name == 'workflow_dispatch'
needs: changes
if: needs.changes.outputs.run-ci == 'true' && (github.event.pull_request.draft == false || github.event_name == 'workflow_dispatch')
name: Nightly tests
runs-on: core
steps:
Expand All @@ -48,6 +66,9 @@ jobs:
path: ./target/release/rusk
retention-days: 5
fmt:
needs: changes
if: needs.changes.outputs.run-ci == 'true'

name: Rustfmt
runs-on: core
steps:
Expand Down
27 changes: 21 additions & 6 deletions .github/workflows/webwallet_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,29 @@ on:
- synchronize
- reopened
- ready_for_review
paths:
- "web-wallet/**"
- ".github/workflows/webwallet_ci.yml"
- "!**/*.md"
jobs:
# JOB to run change detection
changes:
runs-on: ubuntu-latest
# Required permissions
permissions:
pull-requests: read
# Set job outputs to values from filter step
outputs:
run-ci: ${{ steps.filter.outputs.run-ci }}
steps:
# For pull requests it's not necessary to checkout the code
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
run-ci:
- 'web-wallet/**'
- '.github/workflows/webwallet_ci.yml'
- '!**/*.md'
lint-test:
if: github.event.pull_request.draft == false || github.event_name == 'workflow_dispatch'
needs: changes
if: needs.changes.outputs.run-ci == 'true' && (github.event.pull_request.draft == false || github.event_name == 'workflow_dispatch')
runs-on: ubuntu-latest

name: Node 20.x
Expand All @@ -26,7 +42,6 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 20.x
registry-url: "https://npm.pkg.github.com/"
scope: "@dusk-network"

- name: Installing dev dependencies
Expand Down

0 comments on commit e3140f3

Please sign in to comment.