Update workflows/publish_pypi.yml
[manga-dl.git] / __.travis.yml
blob662787bea80d3e72254338b8943d67283433bc8a
1 env:
2   global:
3     - CC_TEST_REPORTER_ID=ff7add7a0f454aff7e13c739a06a7aba8e5c8229d3e776e051294341b4721871
4 addons:
5   artifacts: true
6 language: python
7 dist: bionic
8 python:
9   - "3.7" # Jun 2023
10   - "3.8" # Oct 2024
11   - "3.9" # Oct 2025
12 cache: pip
13 before_install:
14   - sudo apt-get update
15   - apt-cache search libssl
16   - sudo apt-get -y install openssl nodejs python-setuptools libwebp-dev
17   - sudo apt install -y -f --fix-missing
18   - python -V
19   - pwd
20   - chmod +x helpers/after_script.sh
21   - chmod +x helpers/before_deploy.sh
22   - chmod +x helpers/before_script.sh
23 install:
24   - npm install -g sass node-sass html-minifier
25   - pip install --upgrade coverage codeclimate-test-reporter setuptools pyinstaller
26   - pip install -r requirements_dev.txt
27 before_script:
28   - source ./helpers/before_script.sh
29   - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
30   - chmod +x ./cc-test-reporter
31   - ./cc-test-reporter before-build
32 script:
33   - if [[ "$TRAVIS_TAG" = "" ]]; then coverage run --omit=manga_py/providers/*.py --source=manga_py run_tests.py; else echo "skip script"; fi
34 after_script:
35   - ./helpers/after_script.sh
36 before_deploy:
37   - echo "Start make gh-pages content"
38   - python gh_build.py
39   - ./helpers/before_deploy.sh
40   - python prepare_setup.py
41 deploy:
42   - provider: pages
43     edge: true
44     local-dir: helpers/gh_pages_content
45     target-branch: gh-pages
46     github-token: $GH_TOKEN
47     skip-cleanup: true
48     skip_cleanup: true
49     on:
50       branch: stable_1.x
51       condition: $TRAVIS_PYTHON_VERSION == "3.8"
52       tags: false
53   - provider: pypi
54     distributions: "sdist bdist_wheel"
55     server: https://upload.pypi.org/legacy/
56     user: "1271"
57     password: $PYPI_PASS
58     skip_cleanup: true
59     on:
60       branch: stable_1.x
61       tags: true
62       condition: $TRAVIS_PYTHON_VERSION == "3.9"