Skip to content

Commit

Permalink
Upgrade CI pipelines (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
ikrivosheev authored Nov 19, 2024
1 parent 190ef8f commit af0aa81
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 40 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v3
uses: docker/metadata-action@v5
with:
images: |
devinr528/cargo-sort
Expand Down
26 changes: 8 additions & 18 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,11 @@ jobs:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
override: true
components: rustfmt, clippy
- name: Check formatting
uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check
- name: Catch common mistakes
uses: actions-rs/cargo@v1
with:
command: mean-clippy
- name: Sort Cargo.toml
run: cargo install cargo-sort && cargo sort -gc
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt, clippy
- name: Check formatting
run: cargo fmt -- --check
- name: Catch common mistakes
run: cargo clippy
14 changes: 7 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
create-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: taiki-e/create-gh-release-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
token: ${{ secrets.GITHUB_TOKEN }}

upload-assets:
strategy:
Expand All @@ -23,10 +23,10 @@ jobs:
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: taiki-e/upload-rust-binary-action@v1
with:
bin: cargo-sort
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_PROFILE_RELEASE_LTO: true
tar: unix
zip: windows
token: ${{ secrets.GITHUB_TOKEN }}
18 changes: 7 additions & 11 deletions .github/workflows/stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,12 @@ jobs:
name: Check
strategy:
matrix:
os: [ ubuntu-latest, windows-latest ]
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: Run tests
run: cargo test
8 changes: 7 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
[package]
name = "cargo-sort"
version = "1.1.0"
authors = ["Devin R <[email protected]>", "Andronik Ordian <[email protected]>"]
authors = [
"Devin R <[email protected]>",
"Andronik Ordian <[email protected]>",
]
license = "MIT/Apache-2.0"
description = "Check if tables and items in a .toml file are lexically sorted"
repository = "https://github.com/DevinR528/cargo-sort"
Expand Down Expand Up @@ -43,3 +46,6 @@ similar-asserts = "1.5.0"
# name = "fuzz"
# path = "src/fuzz.rs"
# required-features = ["fuzz"]

[profile.release]
lto = true

0 comments on commit af0aa81

Please sign in to comment.