-
Notifications
You must be signed in to change notification settings - Fork 711
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update actions/checkout to v4 (#4751)
* Update actions/checkout to v4 * Use dtolnay rust action instead of deprecated action-rs * Use dtolnay rust action (2) * Use dtolnay rust action (3) * Update JamesIves action for ci doc
- Loading branch information
Showing
1 changed file
with
32 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,41 +22,41 @@ concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
# Actions doc / www page: | ||
# actions/checkout: https://github.com/actions/checkout | ||
# Swatinem/rust-cache: https://github.com/Swatinem/rust-cache | ||
# dtolnay/rust-toolchain: https://github.com/dtolnay/rust-toolchain | ||
# codecov/codecov-action: https://github.com/codecov/codecov-action | ||
|
||
jobs: | ||
# Quick tests on each commit/PR | ||
sanity: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: "recursive" | ||
- uses: actions-rs/toolchain@v1 | ||
- uses: dtolnay/rust-toolchain@master | ||
with: | ||
profile: minimal | ||
toolchain: 1.81.0 | ||
components: rustfmt | ||
override: true | ||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
shared-key: "sanity" | ||
save-if: ${{ github.ref_name == 'main' }} | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: fmt | ||
args: --all -- --check | ||
- run: cargo fmt --all --check | ||
|
||
check: | ||
if: github.ref != 'refs/heads/staging' | ||
needs: sanity | ||
runs-on: ubuntu-latest | ||
continue-on-error: true | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: "recursive" | ||
- uses: actions-rs/toolchain@v1 | ||
- uses: dtolnay/rust-toolchain@master | ||
with: | ||
profile: minimal | ||
toolchain: 1.81.0 | ||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
|
@@ -66,25 +66,21 @@ jobs: | |
with: | ||
version: '23.x' | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: check | ||
- run: cargo check | ||
|
||
clippy: | ||
if: github.ref != 'refs/heads/staging' | ||
needs: sanity | ||
runs-on: ubuntu-latest | ||
continue-on-error: true | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: "recursive" | ||
- uses: actions-rs/toolchain@v1 | ||
- uses: dtolnay/rust-toolchain@master | ||
with: | ||
profile: minimal | ||
toolchain: 1.81.0 | ||
components: clippy | ||
override: true | ||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
shared-key: "clippy" | ||
|
@@ -93,18 +89,15 @@ jobs: | |
with: | ||
version: '23.x' | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: actions-rs/clippy-check@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
args: --no-deps --all-targets | ||
- run: cargo clippy --no-deps --all-targets | ||
|
||
security: | ||
if: github.ref != 'refs/heads/staging' | ||
needs: sanity | ||
runs-on: ubuntu-latest | ||
continue-on-error: true | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: "recursive" | ||
# - uses: actions-rust-lang/audit@v1 | ||
|
@@ -185,14 +178,12 @@ jobs: | |
if: runner.os == 'Linux' | ||
run: df -h | ||
- uses: ilammy/setup-nasm@v1 | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: "recursive" | ||
- uses: actions-rs/toolchain@v1 | ||
- uses: dtolnay/rust-toolchain@master | ||
with: | ||
profile: minimal | ||
toolchain: 1.81.0 | ||
override: true | ||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
shared-key: "massa" | ||
|
@@ -202,22 +193,11 @@ jobs: | |
version: "23.x" | ||
include-pre-releases: false | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: install | ||
args: cargo-nextest --locked | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: nextest | ||
args: run --retries 10 --profile ci --all-features | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: clean | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --doc | ||
- uses: codecov/codecov-action@v3 | ||
- run: cargo install cargo-nextest --locked | ||
- run: cargo nextest run --retries 10 --profile ci --all-features | ||
- run: cargo clean | ||
- run: cargo test --doc | ||
- uses: codecov/codecov-action@v4 | ||
with: | ||
files: lcov.info | ||
fail_ci_if_error: false | ||
|
@@ -233,21 +213,19 @@ jobs: | |
if: github.ref != 'refs/heads/staging' && github.ref != 'refs/heads/main' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: "recursive" | ||
- uses: actions-rs/toolchain@v1 | ||
- uses: dtolnay/rust-toolchain@master | ||
with: | ||
profile: minimal | ||
toolchain: 1.81.0 | ||
components: rustfmt | ||
override: true | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
with: | ||
repository: massalabs/gas-calibration | ||
path: gas-calibration | ||
ref: main | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
with: | ||
repository: massalabs/massa-as-sdk | ||
path: massa-as-sdk | ||
|
@@ -268,15 +246,13 @@ jobs: | |
doc: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: "recursive" | ||
- uses: actions-rs/toolchain@v1 | ||
- uses: dtolnay/rust-toolchain@master | ||
with: | ||
profile: minimal | ||
toolchain: 1.81.0 | ||
components: rustfmt | ||
override: true | ||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
shared-key: "doc" | ||
|
@@ -285,19 +261,16 @@ jobs: | |
with: | ||
version: '23.x' | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: doc | ||
args: --no-deps --document-private-items | ||
- uses: JamesIves/[email protected] | ||
- run: cargo doc --no-deps --document-private-items | ||
- uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
branch: gh-pages | ||
folder: target/doc | ||
|
||
unit_tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: "recursive" | ||
- name: setup_tests | ||
|