forked from Iotic-Labs/py-ubjson
-
Notifications
You must be signed in to change notification settings - Fork 3
42 lines (39 loc) · 1.32 KB
/
run_test.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
name: Test BJData
on: [push]
jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ["2.7", "3.7", "3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
if: startsWith(matrix.python-version, '3.')
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Setup Python2 (Linux)
if: matrix.python-version == '2.7' && startsWith(matrix.os, 'ubuntu')
run: |
sudo ln -fs python2 /usr/bin/python
sudo apt-get update
sudo apt-get install python-setuptools python-dev
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
sudo python2 get-pip.py
ls -l /usr/bin/pip* /usr/local/bin/pip*
which pip
- name: Install packages
run: |
sudo apt-get install cython3 lcov
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install coverage numpy setuptools
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Build, run test and coverage
run: |
./coverage_test.sh
- name: Build sdist
run: |
python setup.py sdist