Skip to content

Commit

Permalink
Migrate to GitHub Actions for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
slashdotdash committed Aug 17, 2020
1 parent b7c8ba9 commit adb8414
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 19 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Test

on: [push, pull_request]

jobs:
build:

name: Build and test
runs-on: ubuntu-latest
strategy:
matrix:
otp: ['22.3']
elixir: ['1.10.4']

services:
postgres:
image: postgres:12
ports: ['5432:5432']
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2

- name: Set up Elixir
uses: actions/setup-elixir@v1
with:
elixir-version: ${{matrix.elixir}}
otp-version: ${{matrix.otp}}

- name: Restore dependencies cache
uses: actions/cache@v2
with:
path: deps
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-

- name: Install dependencies
run: mix deps.get

- name: Check formatting
run: mix format --check-formatted

- name: Setup EventStore test database
run: MIX_ENV=test mix do event_store.create, event_store.init

- name: Run tests
run: mix test
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
elixir 1.10.4-otp-22
19 changes: 0 additions & 19 deletions .travis.yml

This file was deleted.

0 comments on commit adb8414

Please sign in to comment.