Merge branch 'main' of github.com:Asone/nostrss #194
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: Build & Test | |
on: | |
push: | |
branches: [ '*' ] | |
pull_request: | |
branches: [ master ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: ⚒ Install rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: 1.66 | |
override: true | |
components: rustc | |
- name: Install protobuf dependency | |
run: sudo apt-get -y install protobuf-compiler | |
- name: ⚡ Cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: 🏗 Build | |
run: cargo build --verbose | |
- name: 🎯 Run tests | |
env: | |
RUST_TEST_THREADS: 1 | |
run: cargo test --verbose |