Skip to content

chore(deps): bump taiki-e/install-action in the github-actions group #22

chore(deps): bump taiki-e/install-action in the github-actions group

chore(deps): bump taiki-e/install-action in the github-actions group #22

Workflow file for this run

name: CI
on:
push:
branches: [main]
tags: ['v*']
pull_request:
branches: [main]
env:
RUST_BACKTRACE: 1
jobs:
fmt:
name: Format
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Stable toolchain with rustfmt
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- uses: swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
- name: Check coding style
run: cargo fmt --check --all
clippy:
name: Clippy
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Stable toolchain with clippy
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
- name: Lint
run: cargo clippy --all-targets --all-features -- -D warnings
docs:
name: Docs
runs-on: ubuntu-latest
timeout-minutes: 30
env:
RUSTDOCFLAGS: "-Dwarnings"
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: dtolnay/rust-toolchain@stable
- uses: swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
- run: cargo doc --no-deps
tests:
name: Tests
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: dtolnay/rust-toolchain@stable
- uses: swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
- uses: taiki-e/install-action@7277a40b4d8760cc11399bd3f8314c3294e270f5 # v2.42.9
with:
tool: cargo-nextest
- name: Test
run: cargo nextest run --all-features
coverage:
name: Coverage
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: dtolnay/rust-toolchain@nightly
- uses: swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
- uses: taiki-e/install-action@7277a40b4d8760cc11399bd3f8314c3294e270f5 # v2.42.9
with:
tool: cargo-nextest,cargo-llvm-cov
- name: Tests
run: cargo llvm-cov nextest --lcov --output-path lcov.info --all-features
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
with:
files: lcov.info
flags: rust
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
build:
name: Build
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 30
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: dtolnay/rust-toolchain@stable
- uses: swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
# msys2 required by rug on windows
- name: Setup msys2 (windows)
uses: msys2/setup-msys2@d0e80f58dffbc64f6a3a1f43527d469b4fc7b6c8 # v2.23.0
if: matrix.os == 'windows-latest'
with:
install: base-devel pacman-mirrors diffutils m4 make openssl openssl-devel
pacboy: gcc:p rust:p
# Only for windows
- name: Msys2 build (windows)
if: matrix.os == 'windows-latest'
shell: msys2 {0}
run: |
cargo build
- name: Build
if: matrix.os != 'windows-latest'
run: cargo build
publish:
name: Publish
runs-on: ubuntu-latest
timeout-minutes: 30
needs: [fmt, clippy, docs, tests, build]
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
steps:
- name: Checkout sources
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: dtolnay/rust-toolchain@stable
- run: cargo publish --token ${CRATES_TOKEN}
env:
CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}