Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): remove deprecated actions-rs actions #181

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 7 additions & 23 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
## Based on https://github.com/actions-rs/meta/blob/master/recipes/quickstart.md
name: Test

on:
Expand Down Expand Up @@ -30,15 +29,11 @@ jobs:
uses: actions/checkout@v4

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
profile: minimal
toolchain: 1.80.0
override: true
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

override true is default.
profile is not present as an option.

toolchain: 1.82.0
components: clippy, rustfmt

- uses: Swatinem/rust-cache@v2

- name: Install sqlx-cli
run: cargo install [email protected] --no-default-features --features native-tls,postgres

Expand All @@ -49,28 +44,17 @@ jobs:
run: cargo sqlx prepare --check -- --tests

- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --all --all-targets
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--all is deprecated in favor of --workspace

run: cargo build --workspace --all-targets

- name: Test
uses: actions-rs/cargo@v1
with:
command: test
args: --all
run: cargo test --workspace

- name: Lint code
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all
run: cargo clippy --workspace

- name: Check formatting
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the -- is not required anymore

run: cargo fmt --all --check

docker:
name: Test Docker
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM rust:1.80 AS base
FROM rust:1.82 AS base

ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse

Expand Down
7 changes: 0 additions & 7 deletions src/tests/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ impl TestSyncMarker {
pub async fn sync(&self) {
self.get().sync().await;
}
pub fn hits(&self) -> usize {
self.get().hits()
}

fn get(&self) -> &TestSyncMarkerInner {
self.inner
Expand Down Expand Up @@ -57,8 +54,4 @@ impl TestSyncMarkerInner {
pub async fn sync(&self) {
self.rx.lock().await.recv().await.unwrap();
}

pub fn hits(&self) -> usize {
self.hits.load(Ordering::SeqCst)
}
}