Skip to content

Commit 2d5553f

Browse files
feat: dont redo CI
1 parent 09e1323 commit 2d5553f

File tree

3 files changed

+60
-5
lines changed

3 files changed

+60
-5
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
wallet-utils-contract:
2+
- packages/wallet-utils-contract/**
3+
4+
token-history-contract:
5+
- packages/token-history-contract/**
6+
7+
dashpay-contract:
8+
- packages/dashpay-contract/**
9+
10+
masternode-reward-shares-contract:
11+
- packages/masternode-reward-shares-contract/**
12+
13+
withdrawals-contract:
14+
- packages/withdrawals-contract/**
15+
16+
dpns-contract:
17+
- packages/dpns-contract/**
18+
19+
json-schema-compatibility-validator:
20+
- packages/rs-json-schema-compatibility-validator/**
21+
22+
dpp:
23+
- packages/rs-dpp/**
24+
25+
wasm-dpp:
26+
- packages/wasm-dpp/**
27+
28+
drive:
29+
- packages/rs-drive/**
30+
31+
drive-abci:
32+
- packages/rs-drive-abci/**
33+
34+
dapi-grpc:
35+
- packages/dapi-grpc/**
36+
37+
rs-dapi-client:
38+
- packages/rs-dapi-client/**
39+
40+
dash-sdk:
41+
- packages/rs-sdk/**
42+
43+
rs-sdk-ffi:
44+
- packages/rs-sdk-ffi/**

.github/workflows/tests-rs-package.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,16 @@ on:
99
description: If true, try to build each individual feature for this crate
1010
type: boolean
1111
default: false
12+
direct-packages:
13+
description: JSON array of packages that changed directly (not via deps)
14+
type: string
15+
default: '[]'
1216

1317
jobs:
1418
lint:
1519
name: Linting
1620
runs-on: ubuntu-24.04
21+
if: contains(fromJSON(inputs.direct-packages), inputs.package)
1722
permissions:
1823
id-token: write
1924
contents: read
@@ -51,6 +56,7 @@ jobs:
5156
formatting:
5257
name: Formatting
5358
runs-on: ubuntu-24.04
59+
if: contains(fromJSON(inputs.direct-packages), inputs.package)
5460
timeout-minutes: 5
5561
steps:
5662
- name: Check out repo
@@ -71,6 +77,7 @@ jobs:
7177
unused_deps:
7278
name: Unused dependencies
7379
runs-on: ubuntu-24.04
80+
if: contains(fromJSON(inputs.direct-packages), inputs.package)
7481
permissions:
7582
id-token: write
7683
contents: read
@@ -113,10 +120,7 @@ jobs:
113120
name: Detect immutable structure changes
114121
timeout-minutes: 10
115122
runs-on: ubuntu-24.04
116-
# FIXME: as we use `gh pr view` below, this check can only
117-
# run on pull requests. We should find a way to run it
118-
# when manual triggers are used.
119-
if: github.event_name == 'pull_request'
123+
if: github.event_name == 'pull_request' && contains(fromJSON(inputs.direct-packages), inputs.package)
120124
steps:
121125
- name: Checkout base commit
122126
uses: actions/checkout@v4
@@ -207,7 +211,7 @@ jobs:
207211
name: Check each feature
208212
runs-on: ubuntu-24.04
209213
timeout-minutes: 15
210-
if: ${{ inputs.check-each-feature }}
214+
if: ${{ inputs.check-each-feature && contains(fromJSON(inputs.direct-packages), inputs.package) }}
211215
steps:
212216
- name: Check out repo
213217
uses: actions/checkout@v4

.github/workflows/tests.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
outputs:
2727
js-packages: ${{ steps.filter-js.outputs.changes }}
2828
rs-packages: ${{ steps.filter-rs.outputs.changes }}
29+
rs-packages-direct: ${{ steps.filter-rs-direct.outputs.changes }}
2930
steps:
3031
- name: Checkout
3132
uses: actions/checkout@v4
@@ -42,6 +43,11 @@ jobs:
4243
with:
4344
filters: .github/package-filters/rs-packages.yml
4445

46+
- uses: dorny/paths-filter@v2
47+
id: filter-rs-direct
48+
with:
49+
filters: .github/package-filters/rs-packages-direct.yml
50+
4551
build-js:
4652
name: Build JS packages
4753
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' || !github.event.pull_request.draft }}
@@ -84,6 +90,7 @@ jobs:
8490
with:
8591
package: ${{ matrix.rs-package }}
8692
check-each-feature: ${{ contains(fromJSON('["dash-sdk","rs-dapi-client","dapi-grpc","dpp","drive-abci"]'), matrix.rs-package) }}
93+
direct-packages: ${{ needs.changes.outputs.rs-packages-direct }}
8794

8895
rs-crates-security:
8996
name: Rust crates security audit

0 commit comments

Comments
 (0)