File tree 3 files changed +8
-31
lines changed
3 files changed +8
-31
lines changed Original file line number Diff line number Diff line change 1
- # # Based on https://github.com/actions-rs/meta/blob/master/recipes/quickstart.md
2
1
name : Test
3
2
4
3
on :
@@ -30,15 +29,11 @@ jobs:
30
29
uses : actions/checkout@v4
31
30
32
31
- name : Install stable toolchain
33
- uses : actions-rs/ toolchain@v1
32
+ uses : actions-rust-lang/setup-rust- toolchain@v1
34
33
with :
35
- profile : minimal
36
- toolchain : 1.80.0
37
- override : true
34
+ toolchain : 1.82.0
38
35
components : clippy, rustfmt
39
36
40
- - uses : Swatinem/rust-cache@v2
41
-
42
37
- name : Install sqlx-cli
43
38
run :
cargo install [email protected] --no-default-features --features native-tls,postgres
44
39
@@ -49,28 +44,17 @@ jobs:
49
44
run : cargo sqlx prepare --check -- --tests
50
45
51
46
- name : Build
52
- uses : actions-rs/cargo@v1
53
- with :
54
- command : build
55
- args : --all --all-targets
47
+ run : cargo build --workspace --all-targets
56
48
57
49
- name : Test
58
- uses : actions-rs/cargo@v1
59
- with :
60
- command : test
61
- args : --all
50
+ run : cargo test --workspace
62
51
63
52
- name : Lint code
64
- uses : actions-rs/cargo@v1
65
- with :
66
- command : clippy
67
- args : --all
53
+ run : cargo clippy --workspace
68
54
69
55
- name : Check formatting
70
- uses : actions-rs/cargo@v1
71
- with :
72
- command : fmt
73
- args : --all -- --check
56
+ run : cargo fmt --all --check
57
+
74
58
docker :
75
59
name : Test Docker
76
60
runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 1
- FROM rust:1.80 AS base
1
+ FROM rust:1.82 AS base
2
2
3
3
ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
4
4
Original file line number Diff line number Diff line change @@ -19,9 +19,6 @@ impl TestSyncMarker {
19
19
pub async fn sync ( & self ) {
20
20
self . get ( ) . sync ( ) . await ;
21
21
}
22
- pub fn hits ( & self ) -> usize {
23
- self . get ( ) . hits ( )
24
- }
25
22
26
23
fn get ( & self ) -> & TestSyncMarkerInner {
27
24
self . inner
@@ -57,8 +54,4 @@ impl TestSyncMarkerInner {
57
54
pub async fn sync ( & self ) {
58
55
self . rx . lock ( ) . await . recv ( ) . await . unwrap ( ) ;
59
56
}
60
-
61
- pub fn hits ( & self ) -> usize {
62
- self . hits . load ( Ordering :: SeqCst )
63
- }
64
57
}
You can’t perform that action at this time.
0 commit comments