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

98 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:
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@v2
2022-03-05 16:55:41 +00:00
- name: 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
sudo apt-get install -y opus-tools # Need opusinfo for issue #130
2021-04-23 02:34:34 +00:00
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
2021-11-22 10:44:38 +00:00
- 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@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
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@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
2022-06-30 03:03:31 +00:00
toolchain: nightly
2021-04-23 02:34:34 +00:00
override: true
- run: |
rustup component add clippy
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@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- run: |
rustup component add rustfmt
cargo fmt -- --check