kivy/.github/workflows/test_ubuntu_python.yml

108 lines
2.7 KiB
YAML

name: Ubuntu Unittests
on: [push, pull_request]
env:
KIVY_SPLIT_EXAMPLES: 1
jobs:
PEP8_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.x
uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Validate PEP8
run: |
source .ci/ubuntu_ci.sh
validate_pep8
unit_test:
runs-on: ubuntu-latest
env:
DISPLAY: ':99.0'
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.x
uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Install dependencies
run: |
source .ci/ubuntu_ci.sh
install_ubuntu_build_deps
./tools/build_linux_dependencies.sh
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
export KIVY_DEPS_ROOT=$(pwd)/kivy-dependencies
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
- name: Test Kivy benchmarks
run: |
source .ci/ubuntu_ci.sh
test_kivy_benchmark
- name: Upload benchmarks as artifact
uses: actions/upload-artifact@v3
with:
name: benchmarks
path: .benchmarks-kivy
gen_docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.x
uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Install dependencies
run: |
source .ci/ubuntu_ci.sh
install_ubuntu_build_deps
./tools/build_linux_dependencies.sh
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@v3
with:
name: docs
path: doc/build/html
- name: Upload docs to kivy-website-docs
if: github.event_name == 'push'
env:
REF_NAME: ${{ github.ref }}
DOC_PUSH_TOKEN: ${{ secrets.DOC_PUSH_TOKEN }}
run: |
branch_name=$(python3 -c "print('$REF_NAME'.split('/')[-1])")
source .ci/ubuntu_ci.sh
upload_docs_to_server "$branch_name" "$GITHUB_SHA"