Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying out github actions #422

Merged
merged 6 commits into from
Jun 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
125 changes: 125 additions & 0 deletions .github/workflows/elixir.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
name: Elixir CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

env:
MIX_ENV: test

jobs:
build:

runs-on: ubuntu-18.04

strategy:
matrix:
include:
- elixir: 1.10.2
erlang: 22.3

services:
zookeeper:
image: wurstmeister/zookeeper:3.4.6
ports:
- "2181:2181"
healthcheck:
test: ["CMD-SHELL", "echo ruok | nc -w 2 127.0.0.1 2181 | grep -q imok"]
interval: 5s
timeout: 10s
retries: 15
start_period: 10s

kafka1:
hostname: kafka1
image: wurstmeister/kafka:0.11.0.1
ports:
- "9093:9093"
volumes:
- ./ssl:/ssl
- ./scripts/kafka_check_health:/kafka_check_health
env_file: docker-compose-kafka.env
environment:
KAFKA_BROKER_ID: 1
KAFKA_ADVERTISED_PORT: 9093
KAFKA_PORT: 9092
KAFKA_HOST_NAME: kafka1
healthcheck:
test: /kafka_check_health
interval: 10s
timeout: 10s
retries: 30
start_period: 10s
depends_on:
zookeeper:
condition: service_healthy

kafka2:
hostname: kafka2
image: wurstmeister/kafka:0.11.0.1
ports:
- "9094:9094"
volumes:
- ./ssl:/ssl
- ./scripts/kafka_check_health:/kafka_check_health
env_file: docker-compose-kafka.env
environment:
KAFKA_BROKER_ID: 2
KAFKA_ADVERTISED_PORT: 9094
KAFKA_PORT: 9092
KAFKA_HOST_NAME: kafka2
healthcheck:
test: /kafka_check_health
interval: 10s
timeout: 10s
retries: 30
start_period: 10s
depends_on:
zookeeper:
condition: service_healthy

kafka3:
hostname: kafka3
image: wurstmeister/kafka:0.11.0.1
ports:
- "9095:9095"
volumes:
- ./ssl:/ssl
- ./scripts/kafka_check_health:/kafka_check_health
env_file: docker-compose-kafka.env
environment:
KAFKA_BROKER_ID: 3
KAFKA_ADVERTISED_PORT: 9095
KAFKA_PORT: 9092
KAFKA_HOST_NAME: kafka3
healthcheck:
test: /kafka_check_health
interval: 10s
timeout: 10s
retries: 30
start_period: 10s
depends_on:
zookeeper:
condition: service_healthy

steps:
- uses: actions/checkout@v2
- name: Docker-compose up
run: ./scripts/docker_up.sh
- name: Setup elixir
uses: actions/setup-elixir@v1
with:
elixir-version: ${{matrix.elixir}} # Define the elixir version [required]
otp-version: ${{matrix.erlang}} # Define the OTP version [required]
- name: Install Dependencies
run: mix deps.get
- name: Build Dependencies
run: mix deps.compile
- name: Compile
run: mix compile --warnings-as-errors
- name: Docker ps
run: docker ps
- name: Run Tests
run: ./scripts/ci_tests.sh
31 changes: 0 additions & 31 deletions .travis.yml

This file was deleted.