From 8910ed9003233b74f9d4aee2c5151f225baacc50 Mon Sep 17 00:00:00 2001 From: Jack Boberg Date: Tue, 25 Aug 2020 11:47:39 +0200 Subject: [PATCH 1/2] Create elixir.yml --- .github/workflows/elixir.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/elixir.yml diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml new file mode 100644 index 0000000..8e5151f --- /dev/null +++ b/.github/workflows/elixir.yml @@ -0,0 +1,31 @@ +name: Elixir CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + name: Build and test + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up Elixir + uses: actions/setup-elixir@v1 + with: + elixir-version: '1.10.3' # Define the elixir version [required] + otp-version: '22.3' # Define the OTP version [required] + - name: Restore dependencies cache + uses: actions/cache@v2 + with: + path: deps + key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }} + restore-keys: ${{ runner.os }}-mix- + - name: Install dependencies + run: mix deps.get + - name: Run tests + run: mix test From 2bb0277e8ca8fef6be1cb3d939345767a5ae9f54 Mon Sep 17 00:00:00 2001 From: Jack Boberg Date: Tue, 25 Aug 2020 11:56:59 +0200 Subject: [PATCH 2/2] Update elixir.yml configure postgres service --- .github/workflows/elixir.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml index 8e5151f..18cb2cc 100644 --- a/.github/workflows/elixir.yml +++ b/.github/workflows/elixir.yml @@ -12,6 +12,17 @@ jobs: name: Build and test runs-on: ubuntu-latest + services: + postgres: + image: postgres + env: + 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