Skip to content

Commit

Permalink
Update GH action config
Browse files Browse the repository at this point in the history
* Tag pattern
* Branch names as $default-branch macro wasnt working
* Postgres service config
  • Loading branch information
cpjolicoeur committed Sep 15, 2020
1 parent c6be400 commit b9b78f0
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ name: Torch CI

on:
pull_request:
branches: [ $default-branch ]
branches: [ master, main ]
types: [ opened, edited, reopened, synchronize ]
push:
branches: [ $default-branch ]
branches: [ master, main ]
tags:
- v*

- v[1-9].[0-9]+.[0-9]+

jobs:
mix_test:
name: mix test (Elixir ${{matrix.elixir}} | OTP ${{matrix.otp}})
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
Expand All @@ -31,21 +31,27 @@ jobs:
otp: 23.0.4
warnings_as_errors: true
static_analysis: true

services:
postgres:
db:
image: postgres:10.1-alpine
env:
POSTGRES_USER: postgres
POSTGRES_DB: example_test
POSTGRES_PASSWORD: ""
ports:
- 5432:5432
options: --health-cmd pg_isready --health_interval 10s --health_timeout 5s --health_retries 5
ports: [ '5432:5432' ]
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
MIX_ENV: test
DATABASE_POSTGRESQL_USERNAME: postgres
PGHOST: postgres
PGUSER: postgres

steps:
- uses: actions/checkout@v2
- uses: actions/setup-elixir@v1
Expand Down

0 comments on commit b9b78f0

Please sign in to comment.