-
-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
replace travis with github actions (#94)
- Loading branch information
1 parent
2ed3bf9
commit e028d3d
Showing
2 changed files
with
38 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file was deleted.
Oops, something went wrong.