mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-01-19 22:27:59 +01:00
Merge pull request #399 from philomena-dev/workflow-mix-env
Force GH Actions workflows to use test env
This commit is contained in:
commit
77ed150dd9
4 changed files with 19 additions and 15 deletions
5
.dialyzer_ignore.exs
Normal file
5
.dialyzer_ignore.exs
Normal file
|
@ -0,0 +1,5 @@
|
|||
[
|
||||
{"test/support/channel_case.ex", :unknown_function},
|
||||
{"test/support/conn_case.ex", :unknown_function},
|
||||
{"test/support/data_case.ex", :unknown_function}
|
||||
]
|
14
.github/workflows/elixir.yml
vendored
14
.github/workflows/elixir.yml
vendored
|
@ -16,7 +16,7 @@ jobs:
|
|||
_build
|
||||
.cargo
|
||||
deps
|
||||
key: ${{ runner.os }}-deps-2-${{ hashFiles('mix.lock') }}
|
||||
key: ${{ runner.os }}-deps-3-${{ hashFiles('mix.lock') }}
|
||||
|
||||
- name: Enable caching
|
||||
run: |
|
||||
|
@ -34,18 +34,6 @@ jobs:
|
|||
- name: Build and test
|
||||
run: docker compose run app run-test
|
||||
|
||||
- name: mix format
|
||||
run: docker compose run app mix format --check-formatted
|
||||
|
||||
- name: Security lint
|
||||
run: |
|
||||
docker compose run app mix sobelow --config
|
||||
docker compose run app mix deps.audit
|
||||
|
||||
- name: Dialyzer
|
||||
run: |
|
||||
docker compose run app mix dialyzer
|
||||
|
||||
typos:
|
||||
name: 'Check for spelling errors'
|
||||
runs-on: ubuntu-latest
|
||||
|
|
|
@ -1,10 +1,14 @@
|
|||
#!/usr/bin/env sh
|
||||
set -e
|
||||
|
||||
export MIX_ENV=test
|
||||
|
||||
# Always install mix dependencies
|
||||
(cd /srv/philomena && mix deps.get)
|
||||
|
||||
# Run formatting check
|
||||
mix format --check-formatted
|
||||
|
||||
# Sleep to allow OpenSearch to finish initializing
|
||||
# if it's not done doing whatever it does yet
|
||||
echo -n "Waiting for OpenSearch"
|
||||
|
@ -21,4 +25,11 @@ mix ecto.create
|
|||
mix ecto.load
|
||||
|
||||
# Test the application
|
||||
exec mix test
|
||||
mix test
|
||||
|
||||
# Security lint
|
||||
mix sobelow --config
|
||||
mix deps.audit
|
||||
|
||||
# Static analysis
|
||||
exec mix dialyzer
|
||||
|
|
2
mix.exs
2
mix.exs
|
@ -90,7 +90,7 @@ defmodule Philomena.MixProject do
|
|||
{:mix_audit, "~> 2.1", only: [:dev, :test], runtime: false},
|
||||
|
||||
# Static analysis
|
||||
{:dialyxir, "~> 1.2", only: :dev, runtime: false},
|
||||
{:dialyxir, "~> 1.2", only: [:dev, :test], runtime: false},
|
||||
|
||||
# Fixes for Elixir v1.15+
|
||||
{:canary, "~> 1.1",
|
||||
|
|
Loading…
Reference in a new issue