name: Main
on:
push:
branches:
- main
jobs:
test:
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Setup Rust
run: rustup show
- name: Run Tests
run: make test
coverage:
name: Coverage
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Setup Rust
run: rustup show
- uses: taiki-e/install-action@1ed3272338f573e042a2e6bca3893aa19f43b47a with:
tool: cargo-tarpaulin
- name: Generate coverage
run: cargo tarpaulin --out Lcov --engine llvm
- name: Upload to Codecov
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 with:
files: ./lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
format:
name: Formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Setup Rust
run: rustup show
- name: Check Formatting
run: make check-fmt
lint:
name: Linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Setup Rust
run: rustup show
- name: Check Linting
run: make lint
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Setup Rust
run: rustup show
- name: Build
run: cargo build --release
dry-publish:
name: Publish (Dry Run)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Setup Rust
run: rustup show
- name: Publish
run: cargo publish --dry-run
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}