lofty-rs/.github/workflows/ci.yml

100 lines
2.3 KiB
YAML
Raw Normal View History

2021-04-23 02:34:34 +00:00
name: CI
on:
push:
2022-02-03 03:12:39 +00:00
paths-ignore:
- 'LICENSE-*'
- '**/*.md'
- '.gitignore'
2022-04-24 21:08:13 +00:00
- 'CHANGELOG.md'
2022-01-09 00:45:27 +00:00
branches:
- main
2021-04-23 02:34:34 +00:00
pull_request:
workflow_dispatch:
2021-04-23 02:34:34 +00:00
env:
CARGO_TERM_COLOR: always
jobs:
test:
strategy:
matrix:
project: ['.', 'ogg_pager', 'lofty_attr']
defaults:
run:
working-directory: ${{ matrix.project }}
2021-04-23 02:34:34 +00:00
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install test dependencies
2023-01-21 17:11:16 +00:00
run: |
sudo apt-get update
sudo apt-get install -y ffmpeg # Need ffprobe for issue #37
2023-01-21 17:11:16 +00:00
sudo apt-get install -y opus-tools # Need opusinfo for issue #130
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@v1
2021-04-23 02:34:34 +00:00
with:
toolchain: stable
- run: |
cargo test --all-features --tests
2021-04-23 02:34:34 +00:00
docs:
strategy:
matrix:
project: ['.', 'ogg_pager', 'lofty_attr']
defaults:
run:
working-directory: ${{ matrix.project }}
2021-04-23 02:34:34 +00:00
name: Docs
runs-on: ubuntu-latest
2021-11-22 10:44:38 +00:00
env:
RUSTDOCFLAGS: -Dwarnings
2021-04-23 02:34:34 +00:00
steps:
- uses: actions/checkout@v3
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@v1
2021-04-23 02:34:34 +00:00
with:
toolchain: stable
- run: |
cargo doc --all-features --no-deps
cargo test --all-features --doc
2021-04-23 02:34:34 +00:00
clippy:
strategy:
matrix:
project: ['.', 'ogg_pager', 'lofty_attr']
defaults:
run:
working-directory: ${{ matrix.project }}
2021-04-23 02:34:34 +00:00
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@v1
2021-04-23 02:34:34 +00:00
with:
2022-06-30 03:03:31 +00:00
toolchain: nightly
components: clippy
- run: |
cargo clippy --all-features -- -Dclippy::all -Dclippy::pedantic
2021-07-19 16:46:33 +00:00
style:
strategy:
matrix:
project: ['.', 'ogg_pager', 'lofty_attr']
defaults:
run:
working-directory: ${{ matrix.project }}
2021-07-19 16:46:33 +00:00
name: Style
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@v1
with:
toolchain: nightly
components: rustfmt
- run: |
cargo fmt -- --check