File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111 - " .bazelrc"
1212 - " .github/workflows/*.yaml"
1313 pull_request :
14- paths :
15- - " src/**"
16- - " bzl/**"
17- - " BUILD.bazel"
18- - " .bazelrc"
19- - " .github/workflows/*.yaml"
2014 workflow_dispatch :
2115
2216jobs :
17+ changes :
18+ runs-on : ubuntu-latest
19+ outputs :
20+ should_build : ${{ github.event_name != 'pull_request' || steps.filter.outputs.build == 'true' }}
21+ steps :
22+ - uses : actions/checkout@v4
23+ - uses : dorny/paths-filter@v3
24+ id : filter
25+ with :
26+ filters : |
27+ build:
28+ - 'src/**'
29+ - 'bzl/**'
30+ - 'BUILD.bazel'
31+ - '.bazelrc'
32+ - '.github/workflows/*.yaml'
33+
2334 Build :
35+ needs : changes
36+ if : ${{ needs.changes.outputs.should_build == 'true' }}
2437 runs-on : ubuntu-latest
2538 strategy :
2639 matrix :
Original file line number Diff line number Diff line change 77 - " **.cpp"
88 - " **.h"
99 pull_request :
10- paths :
11- # only when a .c, .cpp, or .h file is changed
12- - " **.c"
13- - " **.cpp"
14- - " **.h"
1510 workflow_dispatch :
1611
1712jobs :
13+ changes :
14+ runs-on : ubuntu-latest
15+ outputs :
16+ should_lint : ${{ github.event_name != 'pull_request' || steps.filter.outputs.lint == 'true' }}
17+ steps :
18+ - uses : actions/checkout@v4
19+ - uses : dorny/paths-filter@v3
20+ id : filter
21+ with :
22+ filters : |
23+ lint:
24+ - '**.c'
25+ - '**.cpp'
26+ - '**.h'
27+
1828 Lint-Check :
29+ needs : changes
30+ if : ${{ needs.changes.outputs.should_lint == 'true' }}
1931 runs-on : ubuntu-latest
2032 steps :
2133 - uses : actions/checkout@v4
Original file line number Diff line number Diff line change 1111 - " .bazelrc"
1212 - " .github/workflows/*.yaml"
1313 pull_request :
14- paths :
15- - " src/**"
16- - " bzl/**"
17- - " BUILD.bazel"
18- - " .bazelrc"
19- - " .github/workflows/*.yaml"
2014 workflow_dispatch :
2115
2216jobs :
17+ changes :
18+ runs-on : ubuntu-latest
19+ outputs :
20+ should_test : ${{ github.event_name != 'pull_request' || steps.filter.outputs.test == 'true' }}
21+ steps :
22+ - uses : actions/checkout@v4
23+ - uses : dorny/paths-filter@v3
24+ id : filter
25+ with :
26+ filters : |
27+ test:
28+ - 'src/**'
29+ - 'bzl/**'
30+ - 'BUILD.bazel'
31+ - '.bazelrc'
32+ - '.github/workflows/*.yaml'
33+
2334 Test :
35+ needs : changes
36+ if : ${{ needs.changes.outputs.should_test == 'true' }}
2437 runs-on : ubuntu-latest
2538 steps :
2639 - uses : actions/checkout@v4
Original file line number Diff line number Diff line change 88 - ' ground_station/**'
99 - ' .github/workflows/ground-station-tests.yml'
1010 pull_request :
11- paths :
12- - ' ground_station/**'
13- - ' .github/workflows/ground-station-tests.yml'
11+ workflow_dispatch :
1412
1513jobs :
14+ changes :
15+ runs-on : ubuntu-latest
16+ outputs :
17+ should_run : ${{ github.event_name != 'pull_request' || steps.filter.outputs.ground_station == 'true' }}
18+ steps :
19+ - uses : actions/checkout@v4
20+ - uses : dorny/paths-filter@v3
21+ id : filter
22+ with :
23+ filters : |
24+ ground_station:
25+ - 'ground_station/**'
26+ - '.github/workflows/ground-station-tests.yml'
27+
1628 test :
29+ needs : changes
30+ if : ${{ needs.changes.outputs.should_run == 'true' }}
1731 name : Test Ground Station (${{ matrix.python-version }})
1832 runs-on : ${{ matrix.os }}
1933 strategy :
5367 fail_ci_if_error : false
5468
5569 test-compatibility :
70+ needs : changes
71+ if : ${{ needs.changes.outputs.should_run == 'true' }}
5672 name : Platform Compatibility Tests
5773 runs-on : ubuntu-latest
5874
8298 python -m pytest tests/test_filtering.py -v
8399
84100 lint :
101+ needs : changes
102+ if : ${{ needs.changes.outputs.should_run == 'true' }}
85103 name : Lint Ground Station Code
86104 runs-on : ubuntu-latest
87105
You can’t perform that action at this time.
0 commit comments