Skip to content

Commit

Permalink
Add BuildPulse integration
Browse files Browse the repository at this point in the history
  • Loading branch information
leoamigood committed Oct 20, 2023
1 parent 9a36400 commit 3c95a9e
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 3 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,16 @@ jobs:
# Step: Execute the tests.
- name: Run tests
run: mix test

- name: Upload Test Results to BuildPulse for Flaky Test Detection
if: '!cancelled()' # Run this step even when the tests fail. Skip if the workflow is cancelled.
uses: Workshop64/buildpulse-action@master
with:
account: 1671508 # Replace this value with your BuildPulse account ID
repository: 585572389 # Replace this value with your BuildPulse repository ID
path: tmp/
key: ${{ secrets.BUILDPULSE_ACCESS_KEY_ID }}
secret: ${{ secrets.BUILDPULSE_SECRET_ACCESS_KEY }}
deploy:
name: Deploy app
needs: [dialyzer, test]
Expand Down
7 changes: 7 additions & 0 deletions config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@
# General application configuration
import Config

config :junit_formatter,
report_file: "test_report.xml",
report_dir: "./tmp",
print_report_file: true,
prepend_project_name?: true,
include_filename?: true

config :alternis, game_engine: Alternis.Engines.GameEngine.Impl
config :alternis, match_engine: Alternis.Engines.MatchEngine.WordleImpl
config :alternis, dictionary_engine: Alternis.Engines.DictionaryEngine.Impl
Expand Down
3 changes: 2 additions & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ defmodule Alternis.MixProject do
{:ecto_erd, "~> 0.5", only: :dev},
{:recase, "~> 0.5"},
{:phoenix_view, "~> 2.0.2"},
{:faker, "~> 0.17.0"}
{:faker, "~> 0.17.0"},
{:junit_formatter, "~> 3.3", only: [:test]}
]
end

Expand Down
1 change: 1 addition & 0 deletions mix.lock
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"html_entities": {:hex, :html_entities, "0.5.2", "9e47e70598da7de2a9ff6af8758399251db6dbb7eebe2b013f2bbd2515895c3c", [:mix], [], "hexpm", "c53ba390403485615623b9531e97696f076ed415e8d8058b1dbaa28181f4fdcc"},
"idna": {:hex, :idna, "6.1.1", "8a63070e9f7d0c62eb9d9fcb360a7de382448200fbbd1b106cc96d3d8099df8d", [:rebar3], [{:unicode_util_compat, "~> 0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "92376eb7894412ed19ac475e4a86f7b413c1b9fbb5bd16dccd57934157944cea"},
"jason": {:hex, :jason, "1.4.0", "e855647bc964a44e2f67df589ccf49105ae039d4179db7f6271dfd3843dc27e6", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "79a3791085b2a0f743ca04cec0f7be26443738779d09302e01318f97bdb82121"},
"junit_formatter": {:hex, :junit_formatter, "3.3.1", "c729befb848f1b9571f317d2fefa648e9d4869befc4b2980daca7c1edc468e40", [:mix], [], "hexpm", "761fc5be4b4c15d8ba91a6dafde0b2c2ae6db9da7b8832a55b5a1deb524da72b"},
"metrics": {:hex, :metrics, "1.0.1", "25f094dea2cda98213cecc3aeff09e940299d950904393b2a29d191c346a8486", [:rebar3], [], "hexpm", "69b09adddc4f74a40716ae54d140f93beb0fb8978d8636eaded0c31b6f099f16"},
"mime": {:hex, :mime, "2.0.3", "3676436d3d1f7b81b5a2d2bd8405f412c677558c81b1c92be58c00562bb59095", [:mix], [], "hexpm", "27a30bf0db44d25eecba73755acf4068cbfe26a4372f9eb3e4ea3a45956bff6b"},
"mimerl": {:hex, :mimerl, "1.2.0", "67e2d3f571088d5cfd3e550c383094b47159f3eee8ffa08e64106cdf5e981be3", [:rebar3], [], "hexpm", "f278585650aa581986264638ebf698f8bb19df297f66ad91b18910dfc6e19323"},
Expand Down
2 changes: 0 additions & 2 deletions priv/repo/migrations/20230202195025_add_username_column.exs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
defmodule Alternis.Repo.Migrations.AddUsernameColumn do
use Ecto.Migration

alias Alternis.Accounts.User

def change do
alter table(:users) do
add :username, :citext, null: false, default: ""
Expand Down
1 change: 1 addition & 0 deletions test/test_helper.exs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{:ok, _} = Application.ensure_all_started(:ex_machina)

ExUnit.configure(formatters: [JUnitFormatter, ExUnit.CLIFormatter])
ExUnit.start()
Ecto.Adapters.SQL.Sandbox.mode(Alternis.Repo, :manual)
Empty file added tmp/.keep
Empty file.

0 comments on commit 3c95a9e

Please sign in to comment.