@@ -23,41 +23,21 @@ jobs:
23
23
if : runner.os == 'Windows'
24
24
run : choco install llvm -y
25
25
- name : Git Checkout
26
- uses : actions/checkout@v2
26
+ uses : actions/checkout@v3
27
27
with :
28
28
submodules : recursive
29
29
- name : Rust Toolchain
30
- uses : actions-rs/ toolchain@v1
30
+ uses : dtolnay/rust- toolchain@master
31
31
with :
32
- profile : minimal
33
32
toolchain : stable
34
- override : true
33
+ components : clippy, rustfmt
35
34
- name : Cargo Build
36
- uses : actions-rs/cargo@v1
37
- with :
38
- command : build
39
- args : --verbose --workspace
35
+ run : cargo build --verbose --workspace
40
36
- name : Cargo Test excluding conformance tests
41
- uses : actions-rs/cargo@v1
42
- with :
43
- command : test
44
- args : --verbose --workspace
37
+ run : cargo test --verbose --workspace
45
38
- name : Rustfmt Check
46
- uses : actions-rs/cargo@v1
47
- with :
48
- command : fmt
49
- args : --verbose --all -- --check
50
- # `clippy-check` will run `cargo clippy` on new pull requests. Due to a limitation in GitHub
51
- # permissions, the behavior of the Action is different depending on the source of the PR. If the
52
- # PR comes from the partiql-lang-rust project itself, any suggestions will be added to the PR as comments.
53
- # If the PR comes from a fork, any suggestions will be added to the Action's STDOUT for review.
54
- # For details, see: https://github.com/actions-rs/clippy-check/issues/2
55
- - name : Install Clippy
56
- # The clippy check depends on setup steps defined above, but we don't want it to run
57
- # for every OS because it posts its comments to the PR. These `if` checks limit clippy to
58
- # only running on the Linux test. (The choice of OS was arbitrary.)
59
39
if : matrix.os == 'ubuntu-20.04'
60
- run : rustup component add clippy
40
+ run : cargo fmt --verbose --all -- --check
61
41
- name : Run Clippy
62
42
if : matrix.os == 'ubuntu-20.04'
63
43
uses : actions-rs/clippy-check@v1
68
48
# Cache the `cargo build` so future jobs can reuse build
69
49
- name : Cache cargo build
70
50
if : matrix.os == 'ubuntu-20.04'
71
- uses : actions/cache@v2
51
+ uses : actions/cache@v3
72
52
id : restore-build
73
53
with :
74
54
path : ./*
@@ -105,16 +85,14 @@ jobs:
105
85
steps :
106
86
# Pull down the cached `partiql-lang-rust` build from the `Build and Test` job. This allows us to reuse without
107
87
# needing to rebuild. If pulling the build fails, the subsequent `cargo test` will rebuild.
108
- - uses : actions/checkout@v2
88
+ - uses : actions/checkout@v3
109
89
with :
110
90
submodules : recursive
111
91
- name : Rust Toolchain
112
- uses : actions-rs/ toolchain@v1
92
+ uses : dtolnay/rust- toolchain@master
113
93
with :
114
- profile : minimal
115
94
toolchain : stable
116
- override : true
117
- - uses : actions/cache@v2
95
+ - uses : actions/cache@v3
118
96
id : restore-build
119
97
with :
120
98
path : ./*
@@ -135,7 +113,7 @@ jobs:
135
113
# Cache the `cargo build` and conformance report for `conformance-report-comparison` job (pull_request event only)
136
114
- name : Cache `cargo build` and conformance report
137
115
if : github.event_name == 'pull_request'
138
- uses : actions/cache@v2
116
+ uses : actions/cache@v3
139
117
id : restore-build-and-conformance
140
118
with :
141
119
path : ./*
@@ -147,16 +125,14 @@ jobs:
147
125
if : github.event_name == 'pull_request'
148
126
steps :
149
127
# Pull down cached `cargo build` and conformance report
150
- - uses : actions/checkout@v2
128
+ - uses : actions/checkout@v3
151
129
with :
152
130
submodules : recursive
153
131
- name : Rust Toolchain
154
- uses : actions-rs/ toolchain@v1
132
+ uses : dtolnay/rust- toolchain@master
155
133
with :
156
- profile : minimal
157
134
toolchain : stable
158
- override : true
159
- - uses : actions/cache@v2
135
+ - uses : actions/cache@v3
160
136
id : restore-build-and-conformance
161
137
with :
162
138
path : ./*
@@ -191,21 +167,12 @@ jobs:
191
167
issue-number : ${{ github.event.pull_request.number }}
192
168
comment-author : ' github-actions[bot]'
193
169
body-includes : Conformance
194
- # Convert the markdown comparison report to a readable form for GitHub PR comments
195
- - id : get-comment-body
196
- continue-on-error : true
197
- run : |
198
- body="$(cat ./cts-comparison-report.md)"
199
- body="${body//'%'/'%25'}"
200
- body="${body//$'\n'/'%0A'}"
201
- body="${body//$'\r'/'%0D'}"
202
- echo "::set-output name=body::$body"
203
170
# Create or update (if previous comment exists) with markdown version of comparison report
204
171
- name : Create or update comment
205
172
continue-on-error : true
206
173
uses : peter-evans/create-or-update-comment@v2
207
174
with :
208
175
comment-id : ${{ steps.fc.outputs.comment-id }}
209
176
issue-number : ${{ github.event.pull_request.number }}
210
- body : ${{ steps.get-comment-body.outputs.body }}
177
+ body-file : cts-comparison-report.md
211
178
edit-mode : replace
0 commit comments