ci: Rework the integration tests to be reusable #6302
This file contains hidden or 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: Mac OS pytest | |
| on: | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| build-macos: | |
| name: Build CLN (macOS) | |
| uses: ./.github/workflows/build-cln.yaml | |
| with: | |
| cfg: macos-clang | |
| compiler: clang | |
| os: macos-14 | |
| smoke-test: | |
| name: Smoke Test macOS | |
| runs-on: macos-14 | |
| timeout-minutes: 120 | |
| needs: | |
| - build-macos | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| bitcoind-version: ["27.1"] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Download Bitcoin ${{ matrix.bitcoind-version }} & install binaries | |
| run: | | |
| export BITCOIND_VERSION=${{ matrix.bitcoind-version }} | |
| export TARGET_ARCH="arm64-apple-darwin" | |
| wget https://bitcoincore.org/bin/bitcoin-core-${BITCOIND_VERSION}/bitcoin-${BITCOIND_VERSION}-${TARGET_ARCH}.tar.gz | |
| tar -xzf bitcoin-${BITCOIND_VERSION}-${TARGET_ARCH}.tar.gz | |
| sudo mv bitcoin-${BITCOIND_VERSION}/bin/* /usr/local/bin | |
| rm -rf bitcoin-${BITCOIND_VERSION}-${TARGET_ARCH}.tar.gz bitcoin-${BITCOIND_VERSION} | |
| - name: Download build | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: cln-macos-clang.tar.bz2 | |
| - name: Unpack CLN | |
| run: tar -xaf cln-macos-clang.tar.bz2 | |
| - name: Start bitcoind in regtest mode | |
| run: | | |
| bitcoind -regtest -daemon | |
| sleep 5 | |
| - name: Generate initial block | |
| run: | | |
| bitcoin-cli -regtest createwallet default_wallet | |
| bitcoin-cli -regtest generatetoaddress 1 $(bitcoin-cli -regtest getnewaddress) | |
| sleep 2 | |
| - name: Start CLN in regtest mode | |
| run: | | |
| lightningd/lightningd --network=regtest --log-file=/tmp/l1.log --daemon | |
| sleep 5 | |
| - name: Verify CLN is running | |
| run: | | |
| cli/lightning-cli --regtest getinfo |