-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run cargo/rustup directly in CI (#2)
This is to fix warnings that pop up in Github Actions due to actions-rs/cargo and actions-rs/toolchain not being updated to the Node 16. actions-rs/cargo - [Node.js 12 actions are deprecated. Please use Node.js 16](actions-rs/cargo#216) actions-rs/toolchain - [Node.JS 12 deprecation on GitHub Actions](actions-rs/toolchain#219)
- Loading branch information
Showing
1 changed file
with
23 additions
and
102 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 |
---|---|---|
|
@@ -31,17 +31,11 @@ jobs: | |
- name: "Checkout" | ||
uses: actions/checkout@v3 | ||
|
||
- name: "Cargo Check" | ||
uses: actions-rs/[email protected] | ||
with: | ||
command: check | ||
args: --no-default-features --features ${{ matrix.features }} | ||
- name: "Check for compiler errors" | ||
run: cargo check --no-default-features --features ${{ matrix.features }} | ||
|
||
- name: "Linting" | ||
uses: actions-rs/[email protected] | ||
with: | ||
command: clippy | ||
args: --no-default-features --features ${{ matrix.features }} -- -D warnings | ||
- name: "Run linter" | ||
run: cargo clippy --no-default-features --features ${{ matrix.features }} -- -D warnings | ||
|
||
formatting_check: | ||
needs: code_quality_check | ||
|
@@ -50,18 +44,11 @@ jobs: | |
- name: "Checkout" | ||
uses: actions/checkout@v3 | ||
|
||
- name: "Set Nightly Rust Toolchain" | ||
uses: "actions-rs/toolchain@v1" | ||
with: | ||
toolchain: nightly | ||
override: true | ||
components: rustfmt | ||
- name: "Install the nightly Rust toolchain" | ||
run: rustup toolchain install nightly -c rustfmt | ||
|
||
- name: "Formatting Check" | ||
uses: actions-rs/[email protected] | ||
with: | ||
command: fmt | ||
args: --check | ||
- name: "Check formatting" | ||
run: cargo +nightly fmt --check | ||
|
||
dependancy_audit: | ||
needs: formatting_check | ||
|
@@ -70,10 +57,8 @@ jobs: | |
- name: "Checkout" | ||
uses: actions/checkout@v3 | ||
|
||
- name: "Audit" | ||
uses: actions-rs/[email protected] | ||
with: | ||
command: audit | ||
- name: "Audit dependancies" | ||
run: cargo audit | ||
|
||
test_suite: | ||
needs: [code_quality_check, formatting_check] | ||
|
@@ -108,11 +93,8 @@ jobs: | |
- name: "Checkout" | ||
uses: actions/checkout@v3 | ||
|
||
- name: "Cargo Test" | ||
uses: actions-rs/[email protected] | ||
with: | ||
command: test | ||
args: --no-default-features --features ${{ matrix.features }} --no-fail-fast | ||
- name: "Run tests" | ||
run: cargo test --no-default-features --features ${{ matrix.features }} --no-fail-fast | ||
|
||
os_compat_nix: | ||
needs: test_suite | ||
|
@@ -132,17 +114,8 @@ jobs: | |
- name: "Checkout" | ||
uses: actions/checkout@v3 | ||
|
||
- name: "Cargo Build" | ||
uses: actions-rs/[email protected] | ||
with: | ||
command: build | ||
args: --no-default-features --features ${{ matrix.features }} | ||
|
||
- name: "Cargo Test" | ||
uses: actions-rs/[email protected] | ||
with: | ||
command: test | ||
args: --no-default-features --features ${{ matrix.features }} --no-fail-fast http_logs_from_pub | ||
- name: "Run HTTP test" | ||
run: cargo test --no-default-features --features ${{ matrix.features }} --no-fail-fast http_logs_from_pub | ||
|
||
os_compat_win-msvc: | ||
needs: test_suite | ||
|
@@ -157,17 +130,8 @@ jobs: | |
- name: "Checkout" | ||
uses: actions/checkout@v3 | ||
|
||
- name: "Cargo Build" | ||
uses: actions-rs/[email protected] | ||
with: | ||
command: build | ||
args: --no-default-features --features ${{ matrix.features }} | ||
|
||
- name: "Cargo Test" | ||
uses: actions-rs/[email protected] | ||
with: | ||
command: test | ||
args: --no-default-features --features ${{ matrix.features }} --no-fail-fast http_logs_from_pub | ||
- name: "Run HTTP test" | ||
run: cargo test --no-default-features --features ${{ matrix.features }} --no-fail-fast http_logs_from_pub | ||
|
||
os_compat_win_gnu: | ||
needs: test_suite | ||
|
@@ -179,26 +143,14 @@ jobs: | |
- "rustcrypto,rustls-tls" | ||
runs-on: windows-latest | ||
steps: | ||
- name: "Set GNU Rust Toolchain" | ||
uses: "actions-rs/toolchain@v1" | ||
with: | ||
toolchain: stable-x86_64-pc-windows-gnu | ||
override: true | ||
- name: "Install the stable GNU Rust toolchain" | ||
run: rustup toolchain install stable-gnu | ||
|
||
- name: "Checkout" | ||
uses: actions/checkout@v3 | ||
|
||
- name: "Cargo Build" | ||
uses: actions-rs/[email protected] | ||
with: | ||
command: build | ||
args: --no-default-features --features ${{ matrix.features }} | ||
|
||
- name: "Cargo Test" | ||
uses: actions-rs/[email protected] | ||
with: | ||
command: test | ||
args: --no-default-features --features ${{ matrix.features }} --no-fail-fast http_logs_from_pub | ||
- name: "Run HTTP test" | ||
run: cargo +stable-gnu test --no-default-features --features ${{ matrix.features }} --no-fail-fast http_logs_from_pub | ||
|
||
os_compat_win-msvc_openssl: | ||
needs: test_suite | ||
|
@@ -218,17 +170,8 @@ jobs: | |
- name: "Checkout" | ||
uses: actions/checkout@v3 | ||
|
||
- name: "Cargo Build" | ||
uses: actions-rs/[email protected] | ||
with: | ||
command: build | ||
args: --no-default-features --features ${{ matrix.features }} | ||
|
||
- name: "Cargo Test" | ||
uses: actions-rs/[email protected] | ||
with: | ||
command: test | ||
args: --no-default-features --features ${{ matrix.features }} --no-fail-fast http_logs_from_pub | ||
- name: "Run HTTP test" | ||
run: cargo test --no-default-features --features ${{ matrix.features }} --no-fail-fast http_logs_from_pub | ||
|
||
# Commenting this out for now; getting GNU and OpenSSL set up properly on Windows will take some more work | ||
# os_compat_win_gnu_openssl: | ||
|
@@ -243,26 +186,4 @@ jobs: | |
# - "openssl-vendored,native-tls-vendored" | ||
# runs-on: windows-latest | ||
# steps: | ||
# - name: "Install OpenSSL" | ||
# run: vcpkg install openssl:x64-windows-static-md | ||
|
||
# - name: "Set GNU Rust Toolchain" | ||
# uses: "actions-rs/toolchain@v1" | ||
# with: | ||
# toolchain: stable-x86_64-pc-windows-gnu | ||
# override: true | ||
|
||
# - name: "Checkout" | ||
# uses: actions/checkout@v3 | ||
|
||
# - name: "Cargo Build" | ||
# uses: actions-rs/[email protected] | ||
# with: | ||
# command: build | ||
# args: --no-default-features --features ${{ matrix.features }} | ||
|
||
# - name: "Cargo Test" | ||
# uses: actions-rs/[email protected] | ||
# with: | ||
# command: test | ||
# args: --no-default-features --features ${{ matrix.features }} --no-fail-fast http_logs_from_pub | ||
# TODO |