Skip to content

Commit cc943c9

Browse files
authored
Only run tests when rust files have changed (#443)
1 parent 311659f commit cc943c9

File tree

2 files changed

+27
-17
lines changed

2 files changed

+27
-17
lines changed

.github/workflows/lint.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: lint
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
jobs:
10+
lint:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Install rust
16+
uses: actions-rs/toolchain@v1
17+
with:
18+
toolchain: stable
19+
override: true
20+
- name: Lint
21+
run: bash ci/lint.sh
22+
- name: Run ShellCheck
23+
uses: ludeeus/action-shellcheck@master
24+
with:
25+
check_together: 'y'

.github/workflows/test.yml

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ name: test
33
on:
44
push:
55
branches: [master]
6+
paths: '**.rs'
67
pull_request:
78
branches: [master]
9+
paths: '**.rs'
810

911
jobs:
1012
test:
@@ -51,23 +53,6 @@ jobs:
5153
RUST_VERSION: ${{ matrix.rust_version }}
5254
EXHAUSTIVE_TZ: ${{ matrix.exhaustive_tz }}
5355

54-
lint:
55-
runs-on: ubuntu-latest
56-
57-
steps:
58-
- uses: actions/checkout@v2
59-
- name: Install rust
60-
uses: actions-rs/toolchain@v1
61-
with:
62-
toolchain: stable
63-
override: true
64-
- name: Lint
65-
run: bash ci/lint.sh
66-
- name: Run ShellCheck
67-
uses: ludeeus/action-shellcheck@master
68-
with:
69-
check_together: 'y'
70-
7156
no_std:
7257
strategy:
7358
matrix:

0 commit comments

Comments
 (0)