Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to CI builds using Github Actions #3901

Merged
merged 1 commit into from
Dec 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: CI Build
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-18.04, ubuntu-20.04]
steps:
- uses: actions/checkout@v2

- name: Install dependencies
# Some projects don't allow in-source building, so create a separate build directory
# We'll use this as our working directory for all subsequent commands
shell: bash
run: |
sudo add-apt-repository ppa:openshot.developers/libopenshot-daily
sudo apt update
sudo apt install libopenshot-audio-dev libopenshot-dev python3-openshot
sudo apt install qttranslations5-l10n libssl-dev xvfb
sudo apt install python3-pyqt5 python3-pyqt5.qtsvg python3-pyqt5.qtwebengine python3-pyqt5.qtopengl python3-zmq python3-xdg
pip3 install setuptools wheel
pip3 install cx_Freeze==6.1 distro defusedxml requests certifi chardet urllib3

- name: Build Python package
# Use a bash shell so we can use the same syntax for environment variable
# access regardless of the host operating system
shell: bash
run: python3 freeze.py build

- name: Test
shell: bash
run: xvfb-run --auto-servernum --server-num=1 --server-args "-screen 0 1920x1080x24" python3 ./src/tests/query_tests.py
76 changes: 0 additions & 76 deletions .travis.yml

This file was deleted.

4 changes: 3 additions & 1 deletion src/tests/query_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import random
import unittest
import uuid
from PyQt5.QtGui import QGuiApplication
from classes.app import OpenShotApp
from classes import info
import openshot # Python module for libopenshot (required video editing module installed separately)
Expand All @@ -46,7 +47,7 @@ class TestQueryClass(unittest.TestCase):
def setUpClass(TestQueryClass):
""" Init unit test data """
# Create Qt application
TestQueryClass.app = OpenShotApp(sys.argv, mode="unittest")
TestQueryClass.app = OpenShotApp([], mode="unittest")
TestQueryClass.clip_ids = []
TestQueryClass.file_ids = []
TestQueryClass.transition_ids = []
Expand Down Expand Up @@ -318,4 +319,5 @@ def test_add_file(self):


if __name__ == '__main__':
app = QGuiApplication(sys.argv)
unittest.main()
1 change: 1 addition & 0 deletions src/windows/main_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -2882,6 +2882,7 @@ def __init__(self, *args, mode=None):
# Connect signals
if self.mode != "unittest":
self.RecoverBackup.connect(self.recover_backup)
app.aboutToQuit.connect(self.close)

# Initialize and start the thumbnail HTTP server
self.http_server_thread = httpThumbnailServerThread()
Expand Down
1 change: 1 addition & 0 deletions src/windows/views/webview.py
Original file line number Diff line number Diff line change
Expand Up @@ -3175,6 +3175,7 @@ def __init__(self, window):
# Connect shutdown signals
app.aboutToQuit.connect(self.redraw_audio_timer.stop)
app.aboutToQuit.connect(self.cache_renderer.stop)
app.aboutToQuit.connect(self.deleteLater)

# Delay the start of cache rendering
QTimer.singleShot(1500, self.cache_renderer.start)