Run integration tests in Travis
Travis now offers /dev/kvm, and its machines are powerful enough to run our browser integration tests, at least for small projects. Building an RPM on the Ubuntu host environment is a bit tricky, as there are no installed RPMs. Thus ignore the BuildRequires, and install appstream-util explicitly. In the future, the rpm/deb build should happen inside the VM (like Cockpit does). Add two scenarios for current Fedora and CentOS 8. Switch to the "minimal" environment to make the test easier to reproduce locally and more explicit. Closes #386
This commit is contained in:
parent
180dde395e
commit
0ea06f9235
2 changed files with 31 additions and 5 deletions
29
.travis.yml
29
.travis.yml
|
|
@ -1,12 +1,31 @@
|
||||||
dist: focal
|
dist: focal
|
||||||
sudo: false
|
sudo: true
|
||||||
language: node_js
|
language: minimal
|
||||||
node_js:
|
|
||||||
- "lts/*"
|
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
|
- appstream-util
|
||||||
|
- chromium-browser
|
||||||
|
- curl
|
||||||
|
- git
|
||||||
|
- libvirt-daemon-system
|
||||||
|
- npm
|
||||||
|
- python3-libvirt
|
||||||
|
- qemu-kvm
|
||||||
|
- qemu-utils
|
||||||
|
- rpm
|
||||||
- sassc
|
- sassc
|
||||||
|
env:
|
||||||
|
- TEST_OS=fedora-33
|
||||||
|
- TEST_OS=centos-8-stream
|
||||||
script:
|
script:
|
||||||
- make
|
# HACK: /dev/kvm is root:kvm 0660 by default
|
||||||
|
- sudo chmod 666 /dev/kvm
|
||||||
|
|
||||||
|
# test PO template generation
|
||||||
- make po/starter-kit.pot
|
- make po/starter-kit.pot
|
||||||
|
|
||||||
|
# FIXME: build rpm inside VM; no installed rpms on Travis Ubuntu environment
|
||||||
|
- sed -i '/^BuildRequires:/d' *.spec.in
|
||||||
|
|
||||||
|
- TEST_JOBS=$(nproc) make check
|
||||||
|
|
|
||||||
|
|
@ -80,6 +80,13 @@ You can also run the test against a different Cockpit image, for example:
|
||||||
|
|
||||||
TEST_OS=fedora-32 make check
|
TEST_OS=fedora-32 make check
|
||||||
|
|
||||||
|
These tests can be run in [Travis CI](https://travis-ci.com/). The included
|
||||||
|
[travis.yml](./.travis.yml) runs the integration tests for two operating
|
||||||
|
systems (Fedora and CentOS 8). Note that if/once your project grows bigger, or
|
||||||
|
gets frequent changes, you likely need to move to a paid account, or different
|
||||||
|
infrastructure with more capacity. Talk to the
|
||||||
|
[Cockpit developers](https://cockpit-project.org/) if you are interested in that.
|
||||||
|
|
||||||
# Customizing
|
# Customizing
|
||||||
|
|
||||||
After cloning the Starter Kit you should rename the files, package names, and
|
After cloning the Starter Kit you should rename the files, package names, and
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue