-
Notifications
You must be signed in to change notification settings - Fork 179
60 lines (57 loc) · 2.1 KB
/
unittests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Python package
on: [push, pull_request]
jobs:
build:
name: python ${{ matrix.python-version }}, bitcoind ${{ matrix.bitcoind-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-13, ubuntu-latest]
python-version: ["3.8", "3.12"]
bitcoind-version: ["24.0.1", "27.1"]
steps:
- uses: actions/checkout@v3
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
with:
version: v0.9.0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
# - name: Cache venv
# id: cache-venv
# uses: actions/cache@v3
# env:
# cache-name: venv
# with:
# path: jmvenv
# key: ${{ runner.os }}-${{ matrix.python-version }}-${{ env.cache-name }}-${{ hashFiles('requirements/*.txt', 'install.sh', '*/setup.py') }}
- name: Setup joinmarket + virtualenv
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
./install.sh --develop --with-qt
./jmvenv/bin/python -m pip install --upgrade pip
- name: Lint with flake8
run: source ./jmvenv/bin/activate && ./test/lint/lint-python.sh
- name: Cache bitcoind
uses: actions/cache@v3
env:
cache-name: bitcoind
BITCOIND_VERSION: ${{ matrix.bitcoind-version }}
with:
path: ~/bitcoin/*/bin/bitcoin*
key: ${{ runner.os }}-${{ env.cache-name }}-${{ env.BITCOIND_VERSION }}-${{ hashFiles('test/testrunner/install_bitcoind.sh') }}
- name: Install bitcoind
env:
BITCOIND_VERSION: ${{ matrix.bitcoind-version }}
run: ./test/testrunner/install_bitcoind.sh
- name: Cache miniircd
uses: actions/cache@v3
env:
cache-name: miniircd
with:
path: miniircd/miniircd
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('test/run_tests.sh') }}
- name: Run tests
run: source ./jmvenv/bin/activate && ./test/run_tests.sh