2021-03-26 09:05:58 +01:00
|
|
|
name: electrs
|
2019-11-15 08:03:13 +01:00
|
|
|
|
2021-09-19 21:38:35 +02:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
pull_request:
|
|
|
|
schedule:
|
2022-04-19 22:56:18 +02:00
|
|
|
- cron: "0 0 * * *" # once a day
|
2019-11-15 08:03:13 +01:00
|
|
|
|
|
|
|
jobs:
|
2021-09-15 16:58:11 +02:00
|
|
|
build:
|
|
|
|
name: Build
|
2023-05-20 11:00:50 +02:00
|
|
|
|
2021-09-15 16:58:11 +02:00
|
|
|
runs-on: ubuntu-latest
|
2023-05-20 11:00:50 +02:00
|
|
|
|
2022-04-19 22:56:18 +02:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
build-args:
|
|
|
|
[
|
|
|
|
--locked --no-default-features,
|
|
|
|
--locked,
|
|
|
|
--locked --features metrics_process,
|
|
|
|
]
|
2021-09-15 16:58:11 +02:00
|
|
|
|
2023-05-20 11:00:50 +02:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: dtolnay/rust-toolchain@stable
|
2021-09-15 16:58:11 +02:00
|
|
|
with:
|
|
|
|
components: rustfmt, clippy
|
2023-05-20 11:00:50 +02:00
|
|
|
|
|
|
|
- name: Install Rust
|
|
|
|
run: rustup component add rustfmt clippy
|
2021-09-15 16:58:11 +02:00
|
|
|
|
|
|
|
- name: Format
|
2023-05-20 11:00:50 +02:00
|
|
|
run: cargo fmt --all -- --check
|
2021-09-15 16:58:11 +02:00
|
|
|
|
|
|
|
- name: Build
|
2023-05-20 11:00:50 +02:00
|
|
|
run: cargo build ${{ matrix.build-args }} --all
|
2021-09-15 16:58:11 +02:00
|
|
|
|
|
|
|
- name: Test
|
2023-05-20 11:00:50 +02:00
|
|
|
run: cargo test ${{ matrix.build-args }} --all
|
2021-09-15 16:58:11 +02:00
|
|
|
|
|
|
|
- name: Clippy
|
2023-05-20 11:00:50 +02:00
|
|
|
run: cargo clippy -- -D warnings
|
2021-09-15 16:58:11 +02:00
|
|
|
|
2023-06-28 17:39:15 +02:00
|
|
|
# integration:
|
|
|
|
# name: Integration
|
|
|
|
# runs-on: ubuntu-latest
|
|
|
|
# steps:
|
|
|
|
# - name: Checkout
|
|
|
|
# uses: actions/checkout@v3
|
|
|
|
# - name: Build
|
|
|
|
# run: docker build -f Dockerfile.ci . --rm -t electrs:tests
|
|
|
|
# - name: Test
|
|
|
|
# run: docker run -v $PWD/contrib/:/contrib -v $PWD/tests/:/tests --rm electrs:tests bash /tests/run.sh
|