Skip to content

Commit

Permalink
Merge #166: Ugrade workflow actions
Browse files Browse the repository at this point in the history
42e7e64 refactor: [#165] remove unmantained workflow action to run cargo commmands (Jose Celano)
b14270b feat: [#165] replace workflow action actions-rs/toolchain@v1 with dtolnay/rust-toolchain@stable (Jose Celano)
3d1a12b feat: [#165] upgrade workflow action: Swatinem/rust-cache@v2 (Jose Celano)
b8793e7 feat: [#165] upgrade workflow action: actions/checkout@v3 (Jose Celano)

Pull request description:

ACKs for top commit:
  josecelano:
    ACK 42e7e64

Tree-SHA512: e9ce987682317f4cf8505ef6d56841bf28e2914313021b39e84674872da6ff6952eb66cbb0ce927c3f5f736def739fa6cf799a37c005252fce4e8dc999a6b289
  • Loading branch information
josecelano committed Feb 2, 2023
2 parents 2ec4268 + 42e7e64 commit f860530
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 37 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/publish_crate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,12 @@ jobs:
if: needs.check-secret.outputs.publish == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable
components: llvm-tools-preview
- uses: Swatinem/rust-cache@v1
- uses: Swatinem/rust-cache@v2
- name: Run Tests
run: cargo test

Expand All @@ -43,11 +42,9 @@ jobs:
uses: actions/checkout@v3

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable
override: true

- run: cargo publish
env:
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/publish_docker_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,12 @@ jobs:
if: needs.check-secret.outputs.publish == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable
components: llvm-tools-preview
- uses: Swatinem/rust-cache@v1
- uses: Swatinem/rust-cache@v2
- name: Run Tests
run: cargo test

Expand Down
37 changes: 12 additions & 25 deletions .github/workflows/test_build_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,43 +9,31 @@ jobs:
env:
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: nightly
override: true
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v1
- uses: Swatinem/rust-cache@v2
- name: Check Rust Formatting
uses: actions-rs/cargo@v1
with:
command: fmt
args: --check
run: cargo fmt --check

test:
needs: format
runs-on: ubuntu-latest
env:
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable
components: llvm-tools-preview
- uses: Swatinem/rust-cache@v1
- uses: Swatinem/rust-cache@v2
- name: Check Rust Code
uses: actions-rs/cargo@v1
with:
command: check
args: --all-targets
run: cargo check --all-targets
- name: Clippy Rust Code
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-targets -- -D clippy::pedantic
run: cargo clippy --all-targets -- -D clippy::pedantic
- uses: taiki-e/install-action@cargo-llvm-cov
- uses: taiki-e/install-action@nextest
- name: Run Tests
Expand All @@ -61,12 +49,11 @@ jobs:
env:
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable
- uses: Swatinem/rust-cache@v1
- uses: Swatinem/rust-cache@v2
- name: Build Torrust Tracker
run: cargo build --release
- name: Upload Build Artifact
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
Expand Down

0 comments on commit f860530

Please sign in to comment.