Skip to content

ci: Update build_and_test.yml to run action on every branch #28

ci: Update build_and_test.yml to run action on every branch

ci: Update build_and_test.yml to run action on every branch #28

name: Rust Build and Test
on:
push:
branches: [ "*" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# run on ubuntu, macos and windows
os: [ubuntu-latest, macos-latest, windows-latest]
toolchain:
- nightly
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose