Remove global context use from dlc-manager #1454
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
on: [push, pull_request] | |
name: Continuous integration | |
jobs: | |
lint: | |
name: lint | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: install clippy | |
run: rustup component add clippy | |
- name: Run clippy | |
run: cargo clippy -- -D warnings | |
no-std: | |
name: no-std lint | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: install clippy | |
run: rustup component add clippy | |
- name: Run clippy dlc | |
run: cargo clippy --no-default-features --features no-std -p dlc -- -D warnings | |
- name: Run clippy dlc-messages | |
run: cargo clippy --no-default-features --features no-std -p dlc-messages -- -D warnings | |
- name: Run clippy dlc-trie | |
run: cargo clippy --no-default-features --features no-std -p dlc-trie -- -D warnings | |
unit-tests: | |
name: unit-tests | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Build | |
run: cargo build --verbose | |
- name: Test | |
run: cargo test --verbose --all-features | |
integration_tests_prepare: | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
outputs: | |
matrix: ${{ steps.set-matrix.outputs.matrix }} | |
steps: | |
- uses: actions/cache@v2 | |
env: | |
cache-name: test-cache | |
with: | |
path: target/debug/deps | |
key: test-cache-${{ github.run_id }}-${{ github.run_number }} | |
- uses: actions/checkout@v2 | |
- id: set-matrix | |
run: cargo test --no-run && echo "::set-output name=matrix::$(scripts/get_test_list.sh execution manager channel_execution)" | |
integration_tests: | |
name: integration-tests | |
needs: integration_tests_prepare | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
strategy: | |
matrix: | |
tests: ${{ fromJson(needs.integration_tests_prepare.outputs.matrix) }} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v2 | |
env: | |
cache-name: test-cache | |
with: | |
path: target/debug/deps | |
key: test-cache-${{ github.run_id }}-${{ github.run_number }} | |
- name: Start bitcoin node | |
run: docker-compose up -d | |
- name: Wait for container to run | |
run: ./scripts/wait_for_container.sh bitcoin-node | |
- name: Wait for electrs to be ready | |
run: ./scripts/wait_for_electrs.sh | |
- name: Run test | |
run: RUST_BACKTRACE=1 ${{ matrix.tests }} --ignored | |
- name: Stop bitcoin node | |
run: ./scripts/stop_node.sh |