Skip to content

Commit

Permalink
replace travis with github actions (#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
williamboman authored Nov 20, 2019
1 parent 2ed3bf9 commit e028d3d
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 31 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/docker-image-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Docker image

on: [push, pull_request]

jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
dockerfile: [Dockerfile, alpine/Dockerfile]
steps:
- name: Set env
run: echo "::set-env name=mount_dir::$(mktemp -d)"

- name: Checkout
uses: actions/checkout@v1

- name: Build Docker image
run: docker build -t thelounge -f ${{ matrix.dockerfile }} .

- name: Start Docker container
run: docker run --user "$UID" -v "${mount_dir}:/var/opt/thelounge" -d -p 9001:9000 --name thelounge thelounge

- name: Check TheLounge version
run: docker exec thelounge thelounge --version | grep --color=never -E "^v[0-9]\.[0-9]\.[0-9]" | cut -c 2- | grep -f /dev/stdin ${{ matrix.dockerfile }}

- name: Wait for server to (hopefully) start
run: sleep 3

- name: Check HTML output
run: curl -sL localhost:9001 | grep "<title>The Lounge</title>"

- name: Check for config.js to be created in the mounted host system directory
run: stat "${mount_dir}/config.js"

- name: Logs
run: docker logs thelounge
31 changes: 0 additions & 31 deletions .travis.yml

This file was deleted.

0 comments on commit e028d3d

Please sign in to comment.