-
Notifications
You must be signed in to change notification settings - Fork 1
60 lines (56 loc) · 1.6 KB
/
unit-tests.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
# This workflow will install Python dependencies, run tests with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Unit tests
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Tests disabled on Python 3.10 because of an issue with pytest
python-version: ["3.7", "3.8", "3.9"]
steps:
- uses: actions/checkout@v2
- name: Install Go for p2pd
uses: actions/setup-go@v2
with:
go-version: '1.12'
- name: Install nodejs for jsp2pd
uses: actions/setup-node@v2
with:
node-version: '16'
- uses: actions/cache@v2
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Install p2pd
run: bash -x scripts/install_p2pd.sh
- name: Install jsp2pd
run: npm install --global libp2p-daemon@0.10.2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Python dependencies
run: |
pip install -e .[test]
- name: Check types
run: |
mypy p2pclient
- name: Run unit tests with p2pd
run: |
pytest -v --daemon=p2pd .
- name: Run unit tests with jsp2pd
run: |
pytest -v --daemon=jsp2pd .