Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

chore(deps): update taiki-e/install-action action to v2.46.1 #726

chore(deps): update taiki-e/install-action action to v2.46.1

chore(deps): update taiki-e/install-action action to v2.46.1 #726

Workflow file for this run

name: CI
on: [ push ]
env:
CI: 1
jobs:
clippy:
name: Clippy validation${{ matrix.all-features && ' with all features' || '' }}
strategy:
fail-fast: false
matrix:
all-features: [ false ]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install Rust with clippy
uses: actions-rust-lang/setup-rust-toolchain@11df97af8e8102fd60b60a77dfbf58d40cd843b8 # v1.10.1
with:
toolchain: stable
components: clippy
cache: false
- name: Rust Cache
uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5
with:
prefix-key: v1-rust
key: all-features-${{ matrix.all-features }}
cache-on-failure: true
- name: Run clippy
uses: clechasseur/rs-clippy-check@a2a93bdcf05de7909aabd62eca762179ad3dbe50 # v3.0.5
with:
args: --workspace --all-targets ${{ matrix.all-features && '--all-features' || '' }} -- -D warnings
fmt:
name: Rustfmt check
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install Rust nightly with rustfmt
uses: actions-rust-lang/setup-rust-toolchain@11df97af8e8102fd60b60a77dfbf58d40cd843b8 # v1.10.1
with:
toolchain: nightly
components: rustfmt
cache: false
- name: Run Rustfmt
uses: clechasseur/rs-fmt-check@1a4ebb722c8e8a04f0d2e363c91744f81c968c42 # v2.0.5
with:
args: --all
msrv-check:
name: MSRV check for Rust ${{ matrix.toolchain }} on ${{ matrix.os }}${{ matrix.all-features && ' with all features' || '' }}
strategy:
fail-fast: false
matrix:
toolchain: [ 1.70.0 ]
os: [ ubuntu ]
all-features: [ false ]
runs-on: ${{ matrix.os }}-latest
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install Rust nightly and ${{ matrix.toolchain }}
uses: actions-rust-lang/setup-rust-toolchain@11df97af8e8102fd60b60a77dfbf58d40cd843b8 # v1.10.1
with:
toolchain: nightly,${{ matrix.toolchain }}
cache: false
- name: Rust Cache
uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5
with:
prefix-key: v7-rust
key: all-features-${{ matrix.all-features }}-msrv-pins-files-${{ hashFiles('**/msrv-pins.toml') }}
cache-on-failure: true
- name: Install required tools
uses: taiki-e/install-action@6aa8b420a527920162babdd71d780f9e5b3b4bc8 # v2.46.1
with:
tool: just,cargo-hack,cargo-minimal-versions,cargo-msrv,cargo-msrv-prep
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Note: there's a problem where running `cargo msrv-prep` with a version of Rust
# that's too old to resolve dependencies _before_ we apply the MSRV pins fails.
# For now, we'll run `cargo msrv-prep` and `cargo msrv-unprep` using the Nightly
# toolchain to work around the issue, but I'll have to think of a better way.
- name: Run checks using cargo-minimal-versions
run: |
just toolchain=nightly prep
just all_features=${{ matrix.all-features }} _check-minimal-only
just _rimraf target-minimal
just toolchain=nightly unprep
build:
name: Build for Rust ${{ matrix.toolchain }}${{ matrix.experimental && ' (experimental)' || '' }} on ${{ matrix.os }}${{ matrix.ignore-lock && ' without Cargo.lock' || '' }}${{ matrix.all-features && ' with all features' || '' }}
strategy:
fail-fast: false
matrix:
toolchain: [ 1.75.0, stable, nightly ]
os: [ ubuntu ]
ignore-lock: [ false ]
all-features: [ false ]
include:
- experimental: false
- toolchain: nightly
experimental: true
runs-on: ${{ matrix.os }}-latest
continue-on-error: ${{ matrix.experimental }}
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Remove Cargo.lock
if: ${{ matrix.ignore-lock }}
run: rm Cargo.lock
- name: Install Rust ${{ matrix.toolchain }}
uses: actions-rust-lang/setup-rust-toolchain@11df97af8e8102fd60b60a77dfbf58d40cd843b8 # v1.10.1
with:
toolchain: ${{ matrix.toolchain }}
cache: false
- name: Rust Cache
if: ${{ !matrix.experimental }}
uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5
with:
prefix-key: v2-rust
key: ignore-lock-${{ matrix.ignore-lock }}-all-features-${{ matrix.all-features }}
cache-on-failure: true
- name: Install just
uses: taiki-e/install-action@6aa8b420a527920162babdd71d780f9e5b3b4bc8 # v2.46.1
with:
tool: just
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Start DB containers
uses: hoverkraft-tech/compose-action@f1ca7fefe3627c2dab0ae1db43a106d82740245e # v2.0.2
with:
down-flags: "--volumes"
- name: Run DB migrations
uses: clechasseur/rs-cargo@34eb9ee3e4186e5c7820a54393fbf081f78bc102 # v2.0.5
with:
command: run
args: --bin run_migrations
- name: Run checks
run: just all_features=${{ matrix.all-features }} check
- name: Run tests
run: just all_features=${{ matrix.all-features }} test
tarpaulin:
name: Code coverage
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@11df97af8e8102fd60b60a77dfbf58d40cd843b8 # v1.10.1
with:
toolchain: stable
cache: false
- name: Rust Cache
uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5
with:
prefix-key: v2-rust
cache-targets: false
cache-on-failure: true
- name: Install cargo-tarpaulin
uses: taiki-e/install-action@6aa8b420a527920162babdd71d780f9e5b3b4bc8 # v2.46.1
with:
tool: cargo-tarpaulin
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Start DB containers
uses: hoverkraft-tech/compose-action@f1ca7fefe3627c2dab0ae1db43a106d82740245e # v2.0.2
with:
down-flags: "--volumes"
- name: Run DB migrations
uses: clechasseur/rs-cargo@34eb9ee3e4186e5c7820a54393fbf081f78bc102 # v2.0.5
with:
command: run
args: --bin run_migrations
- name: Run cargo-tarpaulin
uses: clechasseur/rs-cargo@34eb9ee3e4186e5c7820a54393fbf081f78bc102 # v2.0.5
with:
command: tarpaulin
- name: Upload code coverage results to codecov.io
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
- name: Archive code coverage results
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: code-coverage-report
path: |
cobertura.xml
tarpaulin-report.html
doc:
name: Rustdoc check for Rust ${{ matrix.toolchain }}${{ matrix.experimental && ' (experimental)' || '' }}
strategy:
fail-fast: false
matrix:
toolchain: [ stable, nightly ]
include:
- experimental: false
- toolchain: nightly
experimental: true
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental }}
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install Rust ${{ matrix.toolchain }}
uses: actions-rust-lang/setup-rust-toolchain@11df97af8e8102fd60b60a77dfbf58d40cd843b8 # v1.10.1
with:
toolchain: ${{ matrix.toolchain }}
cache: false
- name: Rust Cache
if: ${{ !matrix.experimental }}
uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5
with:
prefix-key: v2-rust
cache-targets: false
cache-on-failure: true
- name: Install just
uses: taiki-e/install-action@6aa8b420a527920162babdd71d780f9e5b3b4bc8 # v2.46.1
with:
tool: just
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Generate doc using rustdoc
run: just doc
publish-dry-run:
name: Publish dry-run
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@11df97af8e8102fd60b60a77dfbf58d40cd843b8 # v1.10.1
with:
toolchain: stable
cache: false
- name: Rust Cache
uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5
with:
prefix-key: v2-rust
cache-targets: false
cache-on-failure: true
- name: Perform publish dry-run
uses: clechasseur/rs-cargo@34eb9ee3e4186e5c7820a54393fbf081f78bc102 # v2.0.5
with:
command: publish
args: --dry-run
docker-image:
name: Build Docker image for Rust ${{ matrix.toolchain }}${{ matrix.experimental && ' (experimental)' || '' }}
strategy:
fail-fast: false
matrix:
toolchain: [ stable, nightly ]
include:
- experimental: false
- toolchain: nightly
experimental: true
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1
- name: Build Docker image
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0
with:
target: final
push: false
tags: clechasseur/pokerust:ci
build-args: RUST_TOOLCHAIN=${{ matrix.toolchain }}
cache-from: ${{ matrix.experimental && 'type=inline' || 'type=gha' }}
cache-to: ${{ matrix.experimental && 'type=inline' || 'type=gha,mode=max' }}