elementary / docker

Docker containers of elementary OS environments and related tools primarily used in Travis Continuous Integration Automated Testing
24 stars 12 forks source link

Create testing images for easier travis tests #2

Open btkostner opened 7 years ago

btkostner commented 7 years ago

Having a travis file like this sucks. We should have a loki-travis image that contains a script to install the packages and run the build system. That way we can update tests without having to update all of the repositories. Plus, it cleans up the travis file quite a bit.

language: generic

services:
 - docker

env:
 - DEPENDENCY_PACKAGES="appstream cmake desktop-file-utils libcanberra-dev libgdk-pixbuf2.0-dev libgranite-dev valac"

install:
 - docker pull elementary/docker:loki
 - docker run -v "$PWD":/tmp/build-dir elementary/docker:loki /bin/sh -c "apt-get update && apt-get -y install $DEPENDENCY_PACKAGES && cd /tmp/build-dir && cmake . && env CTEST_OUTPUT_ON_FAILURE=true make all test"
 - docker pull elementary/docker:loki-unstable
 - docker run -v "$PWD":/tmp/build-dir elementary/docker:loki-unstable /bin/sh -c "apt-get update && apt-get -y install $DEPENDENCY_PACKAGES && cd /tmp/build-dir && cmake . && env CTEST_OUTPUT_ON_FAILURE=true make all test"

script:
 - echo BUILDS PASSED

Ultimately we should be able to do something like this:

language: generic

services:
 - docker

env:
 - TRAVIS_PACKAGES="libcanberra-dev libgdk-pixbuf2.0-dev libgranite-dev valac"

before_install:
 - env | grep "^TRAVIS" > .env

install:
 - docker pull elementary/docker:loki-travis
 - docker pull elementary/docker:loki-unstable-travis

script:
 - docker run --env-file .env -v "$PWD":/tmp/travis elementary/docker:loki-travis
 - docker run --env-file .env -v "$PWD":/tmp/travis elementary/docker:loki-unstable-travis
danirabbit commented 5 years ago

@btkostner is this satisfied by @kgrubb's recent PR?