-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #195 from CaptainFact/ops/github-actions
ops: Move CI to Github actions
- Loading branch information
Showing
6 changed files
with
74 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: CI | ||
|
||
on: [push] | ||
|
||
env: | ||
MIX_ENV: test | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/[email protected] | ||
with: | ||
otp-version: 21.x | ||
elixir-version: 1.6.x | ||
- name: Check format | ||
run: mix format --check-formatted | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
services: | ||
db: | ||
image: postgres:9.6 | ||
ports: ["5432:5432"] | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/cache@v1 | ||
with: | ||
path: deps | ||
key: ${{ runner.os }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} | ||
restore-keys: | | ||
${{ runner.os }}-mix- | ||
- uses: actions/[email protected] | ||
with: | ||
otp-version: 21.x | ||
elixir-version: 1.6.x | ||
- name: Install dependencies | ||
run: mix deps.get | ||
- name: Prepare DB | ||
run: mix ecto.create && mix ecto.migrate | ||
- name: Run tests | ||
run: mix coveralls.github --umbrella |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- staging | ||
|
||
env: | ||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | ||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
jobs: | ||
push-to-docker-hub: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- run: ./rel/release.sh ${GITHUB_REF##*/} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters