acsm-calibre-plugin/.github/workflows/main.yml

50 lines
1.3 KiB
YAML
Raw Normal View History

2021-09-19 20:20:56 +06:00
name: Build binaries
on:
push:
branches: [ master ]
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
2021-09-20 15:24:11 +06:00
- name: Install compilers
run: |
sudo apt update ; sudo apt install -y gcc-mingw-w64-i686 gcc-mingw-w64-x86-64
2021-09-19 20:20:56 +06:00
- name: Compile
run: |
2021-09-20 15:24:11 +06:00
./bundle_calibre_plugin.sh
2021-09-19 20:20:56 +06:00
- name: Upload
uses: actions/upload-artifact@v2
with:
name: linux
path: |
2021-09-20 15:24:11 +06:00
calibre-plugin.zip
2021-12-19 04:53:51 +06:00
test-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
2021-12-20 03:13:19 +06:00
# Require cryptography >= 3.1 because in 3.0 and below, the backend param in load_key_and_certificates was still required.
pip3 install freezegun lxml pycryptodome rsa oscrypto "cryptography>=3.1"
2022-01-16 22:43:29 +06:00
# Install Python2 stuff
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
python2 get-pip.py
pip2 install freezegun mock lxml pycryptodome "rsa<=4.3" oscrypto cryptography==3.1
2021-12-19 04:53:51 +06:00
2022-01-16 22:43:29 +06:00
- name: Run tests (Python 3)
2021-12-19 04:53:51 +06:00
run: |
2022-01-16 22:43:29 +06:00
cd tests && python3 ./main.py && cd ..
- name: Run tests (Python 2)
run: |
cd tests && PYTHONWARNINGS=ignore python2 ./main.py && cd ..
2021-12-19 04:53:51 +06:00