Merge pull request #197 from tkrs/remove-appveyor.yml #222
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.commits[0].message, 'chore(release):') }} | |
strategy: | |
fail-fast: false | |
matrix: | |
version: | |
- 1.70.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/[email protected] | |
- 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.commits[0].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 |