mirror of
https://github.com/eigenein/wotbreplay-parser.git
synced 2026-10-21 02:17:02 +02:00
70 lines
1.5 KiB
YAML
70 lines
1.5 KiB
YAML
name: Check
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
permissions:
|
|
checks: write
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
check:
|
|
name: Check
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: 📥 Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: ✨ Set up the toolchain
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: stable
|
|
components: rustfmt, clippy
|
|
|
|
- name: ⚡️ Rust Cache
|
|
uses: Swatinem/rust-cache@v1
|
|
with:
|
|
cache-on-failure: true
|
|
|
|
- name: 🧪 Test without optional features
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: test
|
|
args: --all-targets
|
|
|
|
- name: 🧪 Test all features
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: test
|
|
args: --all-targets --all-features
|
|
|
|
- name: 🧪 Test docs
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: test
|
|
args: --doc --all-features
|
|
|
|
- name: 🪄 Clippy
|
|
uses: actions-rs/clippy-check@v1
|
|
continue-on-error: true
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
args: --all-targets --all-features --tests -- -D warnings
|
|
|
|
- name: 📤 Publish the crates (dry run)
|
|
run: |
|
|
cargo publish --allow-dirty --dry-run
|
|
env:
|
|
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|