From 972603fe49eb318ffa41aba3b3f5f9ae3a3785b2 Mon Sep 17 00:00:00 2001 From: Nitin Misra Date: Thu, 6 Feb 2020 20:35:49 +0530 Subject: [PATCH] Migrate to github actions --- .circleci/config.yml | 15 ------------- .github/workflows/main.yml | 45 ++++++++++++++++++++++++++++++++++++++ README.md | 2 +- 3 files changed, 46 insertions(+), 16 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/main.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 50d9305..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,15 +0,0 @@ -version: 2 -jobs: - build: - docker: - - image: circleci/elixir:1.6.6 - - image: circleci/redis - - working_directory: ~/repo - steps: - - checkout - - - run: mix local.hex --force - - run: mix local.rebar --force - - run: mix deps.get - - run: mix test diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..f525c02 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,45 @@ +name: CI + +on: [push, pull_request] + +jobs: + format: + name: Format + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Install OTP and Elixir + uses: actions/setup-elixir@v1.2.0 + with: + otp-version: 22.1 + elixir-version: 1.6.6 + - name: Install dependencies + run: mix deps.get --only test + - name: Check mix format + run: mix format --check-formatted + + test: + name: Test + runs-on: ubuntu-latest + services: + redis: + image: redis:5.0 + ports: + - 6379:6379 + options: --entrypoint redis-server + steps: + - uses: actions/checkout@v1 + - name: Install OTP and Elixir + uses: actions/setup-elixir@v1.2.0 + with: + otp-version: 22.1 + elixir-version: 1.6.6 + - name: Install dependencies + run: | + mix deps.get --only test + mix deps.compile + - name: Run tests + run: mix test + env: + REDIS_HOST: redis + REDIS_PORT: ${{ job.services.redis.ports[6379] }} diff --git a/README.md b/README.md index ace7b83..a29877c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Flume -[![CircleCI](https://circleci.com/gh/scripbox/flume.svg?style=svg)](https://circleci.com/gh/scripbox/flume) +![Test](https://github.com/scripbox/flume/workflows/CI/badge.svg?branch=master&event=push) Flume is a job processing system backed by [GenStage](https://github.com/elixir-lang/gen_stage) & [Redis](https://redis.io/)