-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(CI): switch from travis to GH actions (#12)
* feat(CI): add rudimentary GH actions workflow * dump github context * fix indent * split test and publish workflows * use branch ref for tags * do not run tests.yml for tags, also test 1.6 in publish.yml * quote branch match in tests.yml * empty commit * non empty commit * back to single file, if: all the release steps * maybe that will properly match * maybe that will properly match the second * maybe that * now releases * verify this actually tries to match * test * chore: delete .travis.yml * run tests on pull_requests also, publish only on tags * publish.yml: match on branches `refs/tags/*` * don't run tests.yml for tags * match everything * match master * match feat/ci * remove others * fully qualify ref * fully qualify ref the second * infinite depth * everything infinite depth * remove * star * two stars * emtpy * when in doubt, add more stars * skip tags * remove tags clause * refspec * everything except tags, again * another star * double the stars and add a slash * try hardcoding branch prefixes * tags? no such thing here * commit * tags * remove job level ifs add dry run to hex script * remove prod env * provide key * fix spelling of 'secrets' * arm publish workflow * add eol
- Loading branch information
Showing
4 changed files
with
129 additions
and
30 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,74 @@ | ||
name: Publish | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
- '*/**' | ||
- '**/**' | ||
|
||
jobs: | ||
# Redundant but can't be helped AFAIK | ||
test-elixir-min-version: | ||
name: Elixir 1.6 - Only Tests | ||
|
||
runs-on: ubuntu-latest | ||
|
||
container: | ||
image: spaceeec/elixir:1.6-slim | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Install Dependencies | ||
run: | | ||
mix local.rebar --force | ||
mix local.hex --force | ||
mix deps.get | ||
- name: Tests | ||
run: mix test | ||
|
||
test-elixir-latest: | ||
name: Elixir 1.9 - Full | ||
|
||
runs-on: ubuntu-latest | ||
|
||
container: | ||
image: spaceeec/elixir:1.9-slim | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Install Dependencies | ||
run: | | ||
mix local.rebar --force | ||
mix local.hex --force | ||
mix deps.get | ||
- name: Formatting | ||
run: mix format --check-formatted | ||
- name: Credo | ||
run: mix credo --strict | ||
- name: Tests | ||
run: mix test | ||
|
||
release: | ||
name: Publish | ||
|
||
needs: [test-elixir-latest, test-elixir-min-version] | ||
|
||
runs-on: ubuntu-latest | ||
|
||
container: | ||
image: spaceeec/elixir:1.9-slim | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Install Dependencies | ||
run: | | ||
mix local.rebar --force | ||
mix local.hex --force | ||
mix deps.get | ||
- name: Compile | ||
run: mix compile | ||
- name: Publish | ||
env: | ||
HEX_API_KEY: ${{ secrets.HEX_API_KEY }} | ||
run: mix hex.publish --yes |
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,55 @@ | ||
name: Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- '*' | ||
- 'feat/*' | ||
- 'docs/*' | ||
- 'fix/*' | ||
- 'refactor/*' | ||
tags: | ||
- '!*' | ||
- '!*/**' | ||
- '!**/**' | ||
|
||
jobs: | ||
test-elixir-min-version: | ||
name: Elixir 1.6 - Only Tests | ||
|
||
runs-on: ubuntu-latest | ||
|
||
container: | ||
image: spaceeec/elixir:1.6-slim | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Install Dependencies | ||
run: | | ||
mix local.rebar --force | ||
mix local.hex --force | ||
mix deps.get | ||
- name: Tests | ||
run: mix test | ||
|
||
test-elixir-latest: | ||
name: Elixir 1.9 - Full | ||
|
||
runs-on: ubuntu-latest | ||
|
||
container: | ||
image: spaceeec/elixir:1.9-slim | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Install Dependencies | ||
run: | | ||
mix local.rebar --force | ||
mix local.hex --force | ||
mix deps.get | ||
- name: Formatting | ||
run: mix format --check-formatted | ||
- name: Credo | ||
run: mix credo --strict | ||
- name: Tests | ||
run: mix test |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.