update ci and codecov workflows #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# TODO: change to dtolnay/rust-toolchain@stable once 1.75.0 lands on stable | |
- name: Install Rust toolchain | |
uses: dtolnay/rust-toolchain@nightly | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
cache: "pip" # caching pip dependencies | |
- run: pip install pre-commit | |
- uses: actions/checkout@v3 | |
- run: cargo build --all-features | |
- run: pre-commit install --hook-type pre-commit | |
- run: pre-commit install --hook-type pre-push | |
- run: bash .git/hooks/pre-commit | |
- run: bash .git/hooks/pre-push | |