Skip to content

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #126

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #126

Workflow file for this run

name: Build and Test
on:
push:
paths-ignore:
- "**.md"
- "**.sh"
pull_request:
paths-ignore:
- "**.md"
- "**.sh"
env:
CARGO_TERM_COLOR: always
jobs:
rustfmt:
name: cargo fmt
runs-on: ubuntu-latest
steps:
- name: Setup | Checkout
uses: actions/checkout@v2
- name: Setup | Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
components: rustfmt
- name: Build | Format
run: cargo fmt --all -- --check
clippy:
name: cargo clippy
runs-on: ubuntu-latest
steps:
- name: Setup | Checkout
uses: actions/checkout@v2
- name: Setup | Cache Cargo
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Setup | Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
components: clippy
- name: Build | Lint
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D clippy::all
cargo_check:
name: cargo check
runs-on: ubuntu-latest
steps:
- name: Setup | Checkout
uses: actions/checkout@v2
- name: Setup | Cache Cargo
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Setup | Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Build | Check
run: cargo check --all
readme_check:
name: cargo sync-readme
needs: cargo_check
runs-on: ubuntu-latest
env:
CARGO_SYNC_README_VERSION: 1.0.0
steps:
- name: Setup | Checkout
uses: actions/checkout@v2
- name: Setup | Cache Cargo
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
~/.cargo/bin/cargo-sync-readme
key: ${{ runner.os }}-cargo-${{ env.CARGO_SYNC_README_VERSION }}
- name: Setup | Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Setup | cargo-sync-readme
run: $(command -v cargo-sync-readme &> /dev/null) || cargo install cargo-sync-readme --version ${{ env.CARGO_SYNC_README_VERSION }}
- name: Build | Check README (gcloud-ctx)
run: |
cd gcloud-ctx
cargo sync-readme --check
echo "gcloud-ctx README is correct"
cd -
test:
name: cargo test
needs: cargo_check
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Setup | Checkout
uses: actions/checkout@v2
- name: Setup | Cache Cargo
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Setup | Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Build | Test
uses: actions-rs/cargo@v1
with:
command: test