From 15cab25aeb4c8b71bf10790407a46e3bda1ab4b6 Mon Sep 17 00:00:00 2001 From: Salvatore Ingala <6681844+bigspider@users.noreply.github.com> Date: Sat, 9 Dec 2023 14:55:17 +0100 Subject: [PATCH] Run tests in CI --- .github/workflows/run-tests.yml | 43 +++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/run-tests.yml diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml new file mode 100644 index 0000000..45fba79 --- /dev/null +++ b/.github/workflows/run-tests.yml @@ -0,0 +1,43 @@ +name: Python Test Suite + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + test: + runs-on: ubuntu-20.04 + container: bigspider/bitcoin_matt + steps: + - name: Run MATT-enabled bitcoind + run: | + bitcoind -regtest --daemon + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.10' + - name: Install pip and pytest + run: | + apt-get update + apt-get install -y python3-pip + pip install -U pytest + - name: Clone + uses: actions/checkout@v2 + - name: Install pymatt + run: | + pip install . + - name: Create test wallet + run: bash ./examples/init.sh + - name: Add repository root to PYTHONPATH + run: echo "PYTHONPATH=$PWD" >> $GITHUB_ENV + - name: Run tests and capture output + run: pytest -vv | tee test_output.txt + - name: Upload test output as artifact + uses: actions/upload-artifact@v2 + with: + name: test-output + path: test_output.txt \ No newline at end of file