Skip to content

Update taiki-e/install-action digest to 073e1fd #76

Update taiki-e/install-action digest to 073e1fd

Update taiki-e/install-action digest to 073e1fd #76

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
# Renovate opens a branch per update; only the newest push to each needs
# checking.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
jobs:
test:
name: Test
# protui targets macOS and Linux, and the platform-sensitive pieces — the
# clipboard tools and the terminal — differ between them, so both are
# exercised.
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
# Installs the toolchain pinned in rust-toolchain.toml, with its
# components, and caches the build. RUSTFLAGS and cargo's warnings
# setting are left alone, so CI compiles exactly as a local build does;
# clippy denies warnings itself.
- uses: actions-rust-lang/setup-rust-toolchain@ecabd13d1c56bd1345c230e542e9144811ad706f # v2
with:
rustflags: ""
build-warnings: warn
# Every check runs through `cargo xtask`, as the pre-commit hook and a
# local run do, so the three cannot drift apart.
- name: Test
run: cargo xtask test
msrv:
name: Minimum Rust
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
# Read from Cargo.toml so a bump only has to happen in one place.
- name: Read rust-version
id: msrv
run: echo "version=$(sed -n 's/^rust-version = "\(.*\)"$/\1/p' Cargo.toml)" >> "$GITHUB_OUTPUT"
# An explicit toolchain is set as a directory override, which outranks
# rust-toolchain.toml, so this job really builds with the minimum.
- uses: actions-rust-lang/setup-rust-toolchain@ecabd13d1c56bd1345c230e542e9144811ad706f # v2
with:
toolchain: ${{ steps.msrv.outputs.version }}
rustflags: ""
build-warnings: warn
- name: Test
run: cargo xtask test
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
# Installs the toolchain pinned in rust-toolchain.toml, with its
# components, and caches the build. RUSTFLAGS and cargo's warnings
# setting are left alone, so CI compiles exactly as a local build does;
# clippy denies warnings itself.
- uses: actions-rust-lang/setup-rust-toolchain@ecabd13d1c56bd1345c230e542e9144811ad706f # v2
with:
rustflags: ""
build-warnings: warn
- name: rustfmt and clippy
run: cargo xtask lint
format:
name: Prettier
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
node-version: lts/*
# The same command as `cargo xtask format-check`; this job installs
# only Node, not Rust.
- name: Check formatting
run: npx --yes prettier --check .
dependencies:
name: Dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
# cargo-deny reads the dependency graph through cargo.
- uses: actions-rust-lang/setup-rust-toolchain@ecabd13d1c56bd1345c230e542e9144811ad706f # v2
with:
rustflags: ""
build-warnings: warn
# A prebuilt, checksum-verified binary rather than a container action,
# so the job runs the same on any runner architecture.
- uses: taiki-e/install-action@073e1fd0bc889c9aee68dbaaa927cde1b5653a83 # v2
with:
tool: cargo-deny
# Known vulnerabilities and unmaintained crates from the RustSec
# database, plus the licence and source policy in deny.toml.
# CI is set, so a missing cargo-deny fails the job rather than skipping.
- name: cargo deny
run: cargo xtask audit