run Cargo in offline mode in CI

This commit is contained in:
Quentin Gliech
2021-07-16 23:04:13 +02:00
parent be59f910b9
commit ebab5085f4

View File

@@ -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