From 731655eb6de30b81226129a20d44817826f66a8a Mon Sep 17 00:00:00 2001 From: Jeremy Brayton Date: Fri, 27 Jan 2023 17:55:12 -0500 Subject: [PATCH] #14 Fix CI Postgres: attempt using the official image. I haven't done this enough to know honestly and I may need a docker login regardless. Dialyzer: No longer supports `race_conditions`: https://github.com/jeremyjh/dialyxir/issues/470. Unknown is included by default I believe so there's no need to include it again. Add MP3Stat exclusions tied to the line numbers. If I drastically change this file I need to follow the warnings too. I'm fine with making this whitelist as I don't think Beatseek had these checks applied or they may have taken different approaches. --- .dialyzer_ignore.exs | 5 ++++- .github/workflows/elixir-build-and-test.yml | 2 +- .github/workflows/nightly-integration-test.yml | 2 +- mix.exs | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.dialyzer_ignore.exs b/.dialyzer_ignore.exs index 0b9fc92..31c90b1 100644 --- a/.dialyzer_ignore.exs +++ b/.dialyzer_ignore.exs @@ -5,4 +5,7 @@ # # More info in the Dialyxir README: # https://github.com/jeremyjh/dialyxir#elixir-term-format -[] +[ + {"lib/beatseek/mp3stat.ex", :call, 166}, + {"lib/beatseek/mp3stat.ex", :guard_fail, 289}, +] diff --git a/.github/workflows/elixir-build-and-test.yml b/.github/workflows/elixir-build-and-test.yml index bd3e779..5625c37 100644 --- a/.github/workflows/elixir-build-and-test.yml +++ b/.github/workflows/elixir-build-and-test.yml @@ -22,7 +22,7 @@ jobs: # Remove if you don't need a database services: db: - image: postgres/postgres:14 + image: postgres:14 env: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres diff --git a/.github/workflows/nightly-integration-test.yml b/.github/workflows/nightly-integration-test.yml index 9daab08..2c1d913 100644 --- a/.github/workflows/nightly-integration-test.yml +++ b/.github/workflows/nightly-integration-test.yml @@ -19,7 +19,7 @@ jobs: # Remove if you don't need a database services: db: - image: postgres/postgres:14 + image: postgres:14 env: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres diff --git a/mix.exs b/mix.exs index 1f032cf..97d859d 100644 --- a/mix.exs +++ b/mix.exs @@ -22,7 +22,7 @@ defmodule Beatseek.MixProject do dialyzer: [ ignore_warnings: ".dialyzer_ignore.exs", plt_file: {:no_warn, "priv/plts/dialyzer.plt"}, - flags: [:error_handling, :race_conditions, :unknown], + flags: [:error_handling], # Error out when an ignore rule is no longer useful so we can remove it list_unused_filters: true ]