Skip to content

Commit

Permalink
ci: setup github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Diluka committed May 27, 2021
1 parent 0ce0976 commit 55e90c3
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: CI

on:
push:
branches:
- master
- main
- next
pull_request:
branches:
- master
- main

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: docker-compose -f docker-compose.test.yml run --rm sut
21 changes: 21 additions & 0 deletions docker-compose.test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: '3.5'

services:
nginx:
build: ./test/nginx
redis:
image: redis
bull-board:
build: .
environment:
REDIS_HOST: redis
PROXY_PATH: /app/bull-board/
PORT: 80
depends_on:
- redis
- nginx
sut: # docker hub test entry
image: curlimages/curl
command: -sSL --retry 3 --retry-connrefused http://nginx/app/bull-board
depends_on:
- bull-board
3 changes: 3 additions & 0 deletions test/nginx/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM nginx:stable-alpine

ADD conf.d/ /etc/nginx/conf.d
16 changes: 16 additions & 0 deletions test/nginx/conf.d/default.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
server {
listen 80;
server_name localhost;
resolver 127.0.0.11;

location ^~ /app/ {
if ($request_uri ~ ^/app/([^/?]+)/?(.*)$ ) {
set $appname "$1";
}

proxy_cache_bypass $cookie_session;
proxy_no_cache $cookie_session;

proxy_pass http://$appname/$2;
}
}

0 comments on commit 55e90c3

Please sign in to comment.