alterware-launcher/.github/workflows/lint.yml

68 lines
1.4 KiB
YAML
Raw Normal View History

2023-06-10 03:33:16 -04:00
on: [push, pull_request]
name: lint
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- name: Checkout sources
2023-10-16 10:11:56 -04:00
uses: actions/checkout@v4
2023-06-10 03:33:16 -04:00
- name: Install stable toolchain
2023-10-16 10:11:56 -04:00
uses: dtolnay/rust-toolchain@stable
2023-06-10 03:33:16 -04:00
with:
toolchain: stable
- name: Run cargo check
2023-10-16 10:11:56 -04:00
uses: clechasseur/rs-cargo@v2
continue-on-error: true
2023-06-10 03:33:16 -04:00
with:
command: check
test:
name: Test Suite
runs-on: ubuntu-latest
steps:
- name: Checkout sources
2023-10-16 10:11:56 -04:00
uses: actions/checkout@v4
2023-06-10 03:33:16 -04:00
- name: Install stable toolchain
2023-10-16 10:11:56 -04:00
uses: dtolnay/rust-toolchain@stable
2023-06-10 03:33:16 -04:00
with:
toolchain: stable
- name: Run cargo test
2023-10-16 10:11:56 -04:00
uses: clechasseur/rs-cargo@v2
continue-on-error: true
2023-06-10 03:33:16 -04:00
with:
command: test
lints:
name: Lints
runs-on: ubuntu-latest
steps:
- name: Checkout sources
2023-10-16 10:11:56 -04:00
uses: actions/checkout@v4
2023-06-10 03:33:16 -04:00
- name: Install stable toolchain
2023-10-16 10:11:56 -04:00
uses: dtolnay/rust-toolchain@stable
2023-06-10 03:33:16 -04:00
with:
toolchain: stable
components: rustfmt, clippy
- name: Run cargo fmt
2023-10-16 10:11:56 -04:00
uses: clechasseur/rs-cargo@v2
continue-on-error: true
2023-06-10 03:33:16 -04:00
with:
command: fmt
args: --all -- --check
- name: Run cargo clippy
2023-10-16 10:11:56 -04:00
uses: clechasseur/rs-cargo@v2
continue-on-error: true
2023-06-10 03:33:16 -04:00
with:
command: clippy
args: -- -D warnings