From 598bfd368a9f9e09a5a72e37f4a0ae7d84e8a8dd Mon Sep 17 00:00:00 2001 From: Dmitri Bogomolov <4glitch@gmail.com> Date: Sun, 27 Jun 2021 17:54:57 +0300 Subject: [PATCH] Setup a github workflow for python testing --- .github/workflows/python-package.yml | 50 ++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/python-package.yml diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml new file mode 100644 index 00000000..a1012fe9 --- /dev/null +++ b/.github/workflows/python-package.yml @@ -0,0 +1,50 @@ +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 install -yq --no-install-suggests --no-install-recommends \ + build-essential libcap-dev libssl-dev python-all-dev python-qt4 tor xvfb + - 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 + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + python setup.py install + - name: Test + run: | + export PYTHONWARNINGS=all + python checkdeps.py + python src/bitmessagemain.py -t + python -bm tests