2020-02-26 16:54:14 +00:00
|
|
|
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
|
|
|
|
|
2020-02-26 23:33:46 +00:00
|
|
|
lint-docker-files:
|
2020-02-26 16:54:14 +00:00
|
|
|
runs-on: ubuntu-latest
|
2020-02-26 23:33:46 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v1
|
|
|
|
- name: lint zammad dockerfile
|
|
|
|
uses: brpaz/hadolint-action@master
|
|
|
|
with:
|
2020-03-05 14:48:26 +00:00
|
|
|
dockerfile: containers/zammad/Dockerfile
|
2020-02-26 23:33:46 +00:00
|
|
|
- name: lint elasticsearch dockerfile
|
|
|
|
uses: brpaz/hadolint-action@master
|
|
|
|
with:
|
2020-03-05 14:48:26 +00:00
|
|
|
dockerfile: containers/zammad-elasticsearch/Dockerfile
|
2020-02-26 23:33:46 +00:00
|
|
|
- name: lint postgresql dockerfile
|
|
|
|
uses: brpaz/hadolint-action@master
|
|
|
|
with:
|
2020-03-05 14:48:26 +00:00
|
|
|
dockerfile: containers/zammad-postgresql/Dockerfile
|
2020-02-26 23:33:46 +00:00
|
|
|
|
2020-03-06 13:41:59 +00:00
|
|
|
build-containers:
|
|
|
|
needs:
|
|
|
|
- lint-bash-scripts
|
|
|
|
- lint-docker-files
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
|
|
|
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
|
|
|
REPO_USER: ${{ secrets.REPO_USER }}
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v1
|
|
|
|
- name: build docker containers
|
|
|
|
run: .github/docker-image-build.sh
|
|
|
|
|
2020-02-26 23:33:46 +00:00
|
|
|
test-docker-compose:
|
2020-03-06 13:41:59 +00:00
|
|
|
needs: build-containers
|
2020-02-27 11:39:59 +00:00
|
|
|
timeout-minutes: 10
|
2020-02-26 23:33:46 +00:00
|
|
|
runs-on: ubuntu-latest
|
2020-02-26 16:54:14 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v1
|
2020-03-06 13:41:59 +00:00
|
|
|
- name: use images build by ci
|
|
|
|
run: sed -i -e 's#VERSION=.*#VERSION=-ci-snapshot#g' < .env
|
2020-02-26 23:33:46 +00:00
|
|
|
- name: pull container images
|
2020-02-26 16:54:14 +00:00
|
|
|
run: docker-compose pull
|
2020-02-26 23:33:46 +00:00
|
|
|
- name: run docker-compose up
|
|
|
|
run: docker-compose up --detach
|
2020-02-27 23:38:52 +00:00
|
|
|
- name: add autowizard file
|
|
|
|
run: docker cp .github/auto_wizard.json zammad-docker-compose_zammad-railsserver_1:/opt/zammad
|
2020-02-26 23:33:46 +00:00
|
|
|
- name: run tests
|
|
|
|
run: .github/tests.sh
|