run Cargo in offline mode in CI
This commit is contained in:
9
.github/workflows/check.yaml
vendored
9
.github/workflows/check.yaml
vendored
@@ -44,6 +44,7 @@ jobs:
|
||||
--target x86_64-apple-darwin
|
||||
--target x86_64-pc-windows-msvc
|
||||
--target x86_64-unknown-linux-musl
|
||||
--frozen --locked
|
||||
|
||||
- name: Fetch dependencies (retry)
|
||||
id: fetch-2
|
||||
@@ -57,6 +58,7 @@ jobs:
|
||||
--target x86_64-apple-darwin
|
||||
--target x86_64-pc-windows-msvc
|
||||
--target x86_64-unknown-linux-musl
|
||||
--frozen --locked
|
||||
|
||||
- name: Fetch dependencies (second retry)
|
||||
uses: actions-rs/cargo@v1
|
||||
@@ -68,6 +70,7 @@ jobs:
|
||||
--target x86_64-apple-darwin
|
||||
--target x86_64-pc-windows-msvc
|
||||
--target x86_64-unknown-linux-musl
|
||||
--frozen --locked
|
||||
|
||||
|
||||
rustfmt:
|
||||
@@ -108,7 +111,7 @@ jobs:
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: fmt
|
||||
args: --all -- --check
|
||||
args: --all --offline -- --check
|
||||
|
||||
|
||||
clippy:
|
||||
@@ -197,7 +200,7 @@ jobs:
|
||||
~/.cargo/git/db
|
||||
key: cargo-deps-${{ hashFiles('**/Cargo.lock') }}
|
||||
|
||||
- name: Setup Cargo cache
|
||||
- name: Setup build cache
|
||||
uses: actions/cache@v2.1.6
|
||||
with:
|
||||
path: |
|
||||
@@ -208,8 +211,10 @@ jobs:
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: build
|
||||
args: --offline
|
||||
|
||||
- name: Test
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: test
|
||||
args: --offline
|
||||
|
||||
Reference in New Issue
Block a user