-
Notifications
You must be signed in to change notification settings - Fork 4
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 #27 from resuelve/feature/github_actions
add support for GH actions
- Loading branch information
Showing
17 changed files
with
260 additions
and
133 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,4 @@ | ||
# Used by "mix format" | ||
[ | ||
inputs: ["mix.exs", "{config,lib,test}/**/*.{ex,exs}"] | ||
] |
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,28 @@ | ||
--- | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
branches: master | ||
|
||
env: | ||
PROJECTS_INFO: W3t9XQ== | ||
GOOGLE_CREDENTIALS: W3t9XQ== | ||
|
||
jobs: | ||
build-and-test: | ||
name: Build and test | ||
runs-on: ubuntu-latest | ||
container: elixir:1.14-alpine | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install build dependencies | ||
run: | | ||
apk add --update bash openssl git | ||
mix local.hex --force && mix local.rebar --force | ||
- name: Install elixir dependencies | ||
run: mix deps.get | ||
- name: Run CI Tests | ||
env: | ||
MIX_ENV: test | ||
run: mix ci |
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,30 @@ | ||
--- | ||
name: Publish to hex.pm | ||
|
||
on: | ||
push: | ||
tags: | ||
- "*" | ||
|
||
env: | ||
PROJECTS_INFO: W3t9XQ== | ||
GOOGLE_CREDENTIALS: W3t9XQ== | ||
|
||
jobs: | ||
publish-hexpm: | ||
name: publish to hex.pm | ||
runs-on: ubuntu-latest | ||
container: elixir:1.14-alpine | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install dependencies | ||
run: | | ||
apk add --update bash openssl git | ||
mix local.hex --force && mix local.rebar --force | ||
- name: Install elixir dependencies | ||
run: mix deps.get | ||
- name: publish to hex.pm | ||
run: mix hex.publish --yes | ||
env: | ||
HEX_API_KEY: ${{ secrets.HEX_KEY_PUBLISH }} | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
use Mix.Config | ||
import Config | ||
|
||
config :flowex, host: System.get_env("DIALOGFLOW_URL") | ||
config :flowex, projects_info: System.get_env("PROJECTS_INFO") |> File.read! | ||
config :flowex, projects_info: System.get_env("PROJECTS_INFO") |> Base.decode64!() | ||
|
||
config :goth, json: System.get_env("GOOGLE_CREDENTIALS") |> File.read! | ||
config :goth, json: System.get_env("GOOGLE_CREDENTIALS") |> Base.decode64!() |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
use Mix.Config | ||
import Config | ||
|
||
config :flowex, host: "${DIALOGFLOW_URL}" | ||
config :flowex, project_info: "${PROJECTS_INFO}" | ||
config :flowex, project_info: "${PROJECTS_INFO}" |> Base.decode64!() | ||
|
||
config :goth, json: "${GOOGLE_CREDENTIALS}" |> File.read! | ||
config :goth, json: "${GOOGLE_CREDENTIALS}" |> Base.decode64!() |
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 |
---|---|---|
@@ -1,14 +1,18 @@ | ||
use Mix.Config | ||
import Config | ||
|
||
config :flowex, host: "api.dialogflow.com" | ||
config :flowex, projects_info: "[\n{\n\"email\": \"client-access@lbot-8992.iam.gserviceaccount.com\"" <> | ||
",\n\"id\":\"lbot-170198\"\n}\n]\n" | ||
|
||
config :flowex, | ||
projects_info: | ||
"[\n{\n\"email\": \"client-access@lbot-8992.iam.gserviceaccount.com\"" <> | ||
",\n\"id\":\"lbot-170198\"\n}\n]\n" | ||
|
||
config :goth, | ||
json: "[{\n \"type\": \"test_service_account\",\n \"project_id\": "<> | ||
"\"test_project\",\n \"private_key_id\": \"0000\",\n \"private_key\""<> | ||
": \"-----BEGIN PRIVATE KEY-----\\ntestPrivateKey\\n-----END PRIVATE KEY-----\\n\""<> | ||
",\n \"client_email\": \"resuelve-bot-api@test_project.test.com\",\n "<> | ||
" \"client_id\": \"0000\",\n \"auth_uri\": \"fakeurl\",\n \"token_uri\":"<> | ||
" \"fakeurl\",\n \"auth_provider_x509_cert_url\": \"fakeurl\",\n "<> | ||
"\"client_x509_cert_url\": \"fakeurl\"\n}]\n" | ||
json: | ||
"[{\n \"type\": \"test_service_account\",\n \"project_id\": " <> | ||
"\"test_project\",\n \"private_key_id\": \"0000\",\n \"private_key\"" <> | ||
": \"-----BEGIN PRIVATE KEY-----\\ntestPrivateKey\\n-----END PRIVATE KEY-----\\n\"" <> | ||
",\n \"client_email\": \"resuelve-bot-api@test_project.test.com\",\n " <> | ||
" \"client_id\": \"0000\",\n \"auth_uri\": \"fakeurl\",\n \"token_uri\":" <> | ||
" \"fakeurl\",\n \"auth_provider_x509_cert_url\": \"fakeurl\",\n " <> | ||
"\"client_x509_cert_url\": \"fakeurl\"\n}]\n" |
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
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
Oops, something went wrong.