zammad-docker-compose/.github/workflows/ci.yaml
André Bauer d9a7d7ea20
test dockerhub images too (#146)
* fixed indentation

* added docker-compose lint

Signed-off-by: André Bauer <monotek23@gmail.com>

* test dockerhub images too

* pull images in separate step

* added smilye

* lowered timeouts
2020-03-07 13:21:46 +01:00

82 lines
2.4 KiB
YAML

name: ci
on:
pull_request:
jobs:
lint-bash-scripts:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Lint Bash scripts
uses: docker://koalaman/shellcheck-alpine:v0.7.0
with:
args: .github/lint-scripts.sh
lint-docker-files:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: lint zammad dockerfile
uses: brpaz/hadolint-action@master
with:
dockerfile: containers/zammad/Dockerfile
- name: lint elasticsearch dockerfile
uses: brpaz/hadolint-action@master
with:
dockerfile: containers/zammad-elasticsearch/Dockerfile
- name: lint postgresql dockerfile
uses: brpaz/hadolint-action@master
with:
dockerfile: containers/zammad-postgresql/Dockerfile
lint-docker-compose-file:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: lint zammad docker-compose file
run: docker-compose config
build-and-run-docker-compose:
needs:
- lint-bash-scripts
- lint-docker-files
- lint-docker-compose-file
timeout-minutes: 20
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: build docker containers
run: .github/docker-image-build.sh
- name: use images build by ci
run: sed -i -e 's#${IMAGE_REPO}:##g' -e 's#${VERSION}##g' docker-compose.yml
- name: run docker-compose up
run: docker-compose up --detach
- name: add autowizard file
run: docker cp .github/auto_wizard.json zammad-docker-compose_zammad-railsserver_1:/opt/zammad
- name: run tests
run: .github/tests.sh
run-remote-image-docker-compose:
needs:
- lint-bash-scripts
- lint-docker-files
- lint-docker-compose-file
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: pull docker-compose images
run: docker-compose pull
- name: run docker-compose up
run: docker-compose up --detach
- name: add autowizard file
run: docker cp .github/auto_wizard.json zammad-docker-compose_zammad-railsserver_1:/opt/zammad
- name: run tests
run: .github/tests.sh