Setup a github workflow for python testing

This commit is contained in:
Dmitri Bogomolov 2021-06-27 17:54:57 +03:00
parent ebdcc363b1
commit f2952b4f03
Signed by untrusted user: g1itch
GPG Key ID: 720A756F18DEED13

56
.github/workflows/test.yml vendored Normal file
View File

@ -0,0 +1,56 @@
name: Quick Test
on: push
jobs:
default:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-18.04, macos-latest]
python-version: [2.7, 3.8]
include:
- os: ubuntu-18.04
python-version: 3.9
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Set environment variables
run: |
if [[ ${{ runner.os }} == macOS ]]; then
echo "LDFLAGS=-L/usr/local/opt/openssl@1.1/lib" >> $GITHUB_ENV
echo "CPPFLAGS=-I/usr/local/opt/openssl@1.1/include" >> $GITHUB_ENV
fi
- name: Install apt dependencies
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt-get update -q
install="sudo apt-get install
-yq --no-install-suggests --no-install-recommends"
$install build-essential libcap-dev libssl-dev python-all-dev tor
if [[ ! ${{ matrix.python-version }} == 2.7 ]]; then
$install qtbase5-dev qt5-default
fi
- name: Install brew dependencies
if: ${{ runner.os == 'macOS' }}
run: |
brew install tor
brew services start tor
- name: Install python dependencies
run: |
python -m pip install --upgrade pip
pip install wheel
pip install -r requirements.txt
python setup.py install
- name: Test
run: |
export PYTHONWARNINGS=all
python checkdeps.py
python src/bitmessagemain.py -t
python -bm tests