lofty-rs/.github/workflows/ci.yml
Serial 5d3be8281b misc: Run CI jobs for all projects
misc: Run CI jobs for all projects
2023-02-24 05:53:39 -05:00

97 lines
2.3 KiB
YAML

name: CI
on:
push:
paths-ignore:
- 'LICENSE-*'
- '**/*.md'
- '.gitignore'
- 'CHANGELOG.md'
branches:
- main
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
test:
strategy:
matrix:
project: ['.', 'ogg_pager', 'lofty_attr']
defaults:
run:
working-directory: ${{ matrix.project }}
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Dependencies
run: |
sudo apt-get update && sudo apt-get install -y ffmpeg # Need ffprobe for issue #37
sudo apt-get install -y opus-tools # Need opusinfo for issue #130
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: cargo test --all-features --tests
docs:
strategy:
matrix:
project: [ '.', 'ogg_pager', 'lofty_attr' ]
defaults:
run:
working-directory: ${{ matrix.project }}
name: Docs
runs-on: ubuntu-latest
env:
RUSTDOCFLAGS: -Dwarnings
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: |
cargo doc --all-features --no-deps
cargo test --all-features --doc
clippy:
strategy:
matrix:
project: [ '.', 'ogg_pager', 'lofty_attr' ]
defaults:
run:
working-directory: ${{ matrix.project }}
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- run: |
rustup component add clippy
cargo clippy --all-features -- -Dclippy::all -Dclippy::pedantic
style:
strategy:
matrix:
project: [ '.', 'ogg_pager', 'lofty_attr' ]
defaults:
run:
working-directory: ${{ matrix.project }}
name: Style
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- run: |
rustup component add rustfmt
cargo fmt -- --check