Skip to content

Update build.yml

Update build.yml #6

Workflow file for this run

name: build
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: rust-toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: cache
uses: Swatinem/rust-cache@v2
- name: iinstall tarpaulin
run: cargo install cargo-tarpaulin
- name: Build
run: cargo build --verbose
- name: Run tests and code coverage
run: cargo tarpaulin --engine llvm --follow-exec --post-test-delay 10 --coveralls ${{ secrets.COVERALLS_TOKEN }}
- name: format check
run: cargo fmt -- --check