mirror of https://github.com/kivy/kivy.git
98 lines
2.5 KiB
YAML
98 lines
2.5 KiB
YAML
name: Ubuntu Unittests
|
|
|
|
on: [push, pull_request]
|
|
|
|
env:
|
|
KIVY_SPLIT_EXAMPLES: 1
|
|
SERVER_IP: '159.203.106.198'
|
|
DOC_VERSIONS: 'stable master stable-1.10.1 stable-1.11.0'
|
|
|
|
jobs:
|
|
PEP8_test:
|
|
runs-on: ubuntu-18.04
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Set up Python 3.x
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: 3.x
|
|
- name: Validate PEP8
|
|
run: |
|
|
source .ci/ubuntu_ci.sh
|
|
validate_pep8
|
|
|
|
unit_test:
|
|
runs-on: ubuntu-18.04
|
|
env:
|
|
DISPLAY: ':99.0'
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Set up Python 3.x
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: 3.x
|
|
- name: Install dependencies
|
|
run: |
|
|
source .ci/ubuntu_ci.sh
|
|
install_kivy_test_run_apt_deps
|
|
install_kivy_test_run_pip_deps
|
|
- name: Setup env
|
|
run: |
|
|
source .ci/ubuntu_ci.sh
|
|
prepare_env_for_unittest
|
|
- name: Install Kivy
|
|
run: |
|
|
source .ci/ubuntu_ci.sh
|
|
install_kivy
|
|
- name: Test Kivy
|
|
run: |
|
|
source .ci/ubuntu_ci.sh
|
|
test_kivy
|
|
- name: Coveralls upload
|
|
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
|
env:
|
|
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
|
|
run: |
|
|
source .ci/ubuntu_ci.sh
|
|
upload_coveralls
|
|
|
|
gen_docs:
|
|
runs-on: ubuntu-18.04
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Set up Python 3.x
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: 3.x
|
|
- name: Install dependencies
|
|
run: |
|
|
source .ci/ubuntu_ci.sh
|
|
install_kivy_test_run_apt_deps
|
|
install_kivy_test_run_pip_deps
|
|
- name: Setup env
|
|
run: |
|
|
source .ci/ubuntu_ci.sh
|
|
prepare_env_for_unittest
|
|
- name: Install Kivy
|
|
run: |
|
|
source .ci/ubuntu_ci.sh
|
|
install_kivy
|
|
- name: Generate docs
|
|
run: |
|
|
source .ci/ubuntu_ci.sh
|
|
generate_docs
|
|
- name: Upload docs as artifact
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: docs
|
|
path: doc/build/html
|
|
- name: Upload docs to server
|
|
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/stable'))
|
|
env:
|
|
REF_NAME: ${{ github.ref }}
|
|
UBUNTU_UPLOAD_KEY: ${{ secrets.UBUNTU_UPLOAD_KEY }}
|
|
run: |
|
|
branch_name=$(python3 -c "print('$REF_NAME'.split('/')[-1])")
|
|
source .ci/ubuntu_ci.sh
|
|
upload_docs_to_server "$DOC_VERSIONS" "$branch_name" "$SERVER_IP"
|