Skip to content

Merge pull request #182 from tkrs/tkrs-patch-1 #191

Merge pull request #182 from tkrs/tkrs-patch-1

Merge pull request #182 from tkrs/tkrs-patch-1 #191

Workflow file for this run

name: CI
on:
push:
branches: [master]
pull_request:
jobs:
build_and_test:
name: Test and Build - ${{ matrix.version }}
runs-on: ubuntu-latest
if: ${{ ! startsWith(github.event.head_commit.message, 'chore(release):') }}
strategy:
fail-fast: false
matrix:
version:
- 1.61.0
- stable
- nightly
services:
fluentd:
image: fluentd
ports:
- 24224:24224
steps:
- uses: actions/checkout@v4
- name: Install ${{ matrix.version }}
uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ matrix.version }}
target: x86_64-unknown-linux-gnu
- uses: Swatinem/rust-cache@v2
with:
cache-directories: ~/.cache/sccache
- uses: mozilla-actions/sccache-action@v0.0.3
- run: |
echo "SCCACHE_GHA_ENABLED=true" >>$GITHUB_ENV
echo "RUSTC_WRAPPER=sccache" >>$GITHUB_ENV
- run: cargo test --workspace --no-fail-fast -- --nocapture
env:
RUST_BACKTRACE: "1"
RUST_LOG: "debug"
- run: cargo build --workspace --verbose
lint:
name: Lint
runs-on: ubuntu-latest
if: ${{ ! startsWith(github.event.head_commit.message, 'chore(release):') }}
steps:
- uses: actions/checkout@v4
- name: Install toolchain and components
uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
target: x86_64-unknown-linux-gnu
components: rustfmt, clippy
- run: cargo fmt -- --color=always --check
- run: cargo check --tests --workspace --verbose
- run: cargo clippy --workspace --verbose