2023-01-22 15:40:43 -05:00
|
|
|
name: Test and build
|
|
|
|
|
|
|
|
on:
|
2023-04-26 03:20:31 -04:00
|
|
|
workflow_call:
|
2023-01-22 15:40:43 -05:00
|
|
|
push:
|
2023-04-26 03:23:04 -04:00
|
|
|
branches-ignore:
|
2023-01-22 15:40:43 -05:00
|
|
|
- master
|
2023-02-13 08:48:09 -05:00
|
|
|
|
2023-01-22 15:40:43 -05:00
|
|
|
jobs:
|
|
|
|
test_nostr-rs-relay:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-05-01 07:20:57 -04:00
|
|
|
- uses: actions/checkout@v3
|
2023-01-22 15:40:43 -05:00
|
|
|
|
|
|
|
- name: Update local toolchain
|
|
|
|
run: |
|
2023-02-13 08:50:48 -05:00
|
|
|
sudo apt-get install -y protobuf-compiler
|
2023-01-22 15:40:43 -05:00
|
|
|
rustup update
|
|
|
|
rustup component add clippy
|
2023-02-13 08:48:09 -05:00
|
|
|
rustup install nightly
|
2023-01-22 15:40:43 -05:00
|
|
|
|
|
|
|
- name: Toolchain info
|
|
|
|
run: |
|
|
|
|
cargo --version --verbose
|
|
|
|
rustc --version
|
2023-02-13 08:48:09 -05:00
|
|
|
cargo clippy --version
|
2023-01-22 15:40:43 -05:00
|
|
|
|
|
|
|
# - name: Lint
|
|
|
|
# run: |
|
|
|
|
# cargo fmt -- --check
|
2023-02-13 08:48:09 -05:00
|
|
|
# cargo clippy -- -D warnings
|
2023-01-22 15:40:43 -05:00
|
|
|
|
|
|
|
- name: Test
|
|
|
|
run: |
|
|
|
|
cargo check
|
2023-02-13 08:48:09 -05:00
|
|
|
cargo test --all
|
2023-01-22 15:40:43 -05:00
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: |
|
2023-02-13 08:48:09 -05:00
|
|
|
cargo build --release --locked
|