mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-01-19 14:17:59 +01:00
Force GH Actions workflows to use test env
This commit is contained in:
parent
02014c4cdf
commit
b794bd72aa
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
|
_build
|
||||||
.cargo
|
.cargo
|
||||||
deps
|
deps
|
||||||
key: ${{ runner.os }}-deps-2-${{ hashFiles('mix.lock') }}
|
key: ${{ runner.os }}-deps-3-${{ hashFiles('mix.lock') }}
|
||||||
|
|
||||||
- name: Enable caching
|
- name: Enable caching
|
||||||
run: |
|
run: |
|
||||||
|
@ -34,18 +34,6 @@ jobs:
|
||||||
- name: Build and test
|
- name: Build and test
|
||||||
run: docker compose run app run-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:
|
typos:
|
||||||
name: 'Check for spelling errors'
|
name: 'Check for spelling errors'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
|
@ -1,10 +1,14 @@
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
set -e
|
||||||
|
|
||||||
export MIX_ENV=test
|
export MIX_ENV=test
|
||||||
|
|
||||||
# Always install mix dependencies
|
# Always install mix dependencies
|
||||||
(cd /srv/philomena && mix deps.get)
|
(cd /srv/philomena && mix deps.get)
|
||||||
|
|
||||||
|
# Run formatting check
|
||||||
|
mix format --check-formatted
|
||||||
|
|
||||||
# Sleep to allow OpenSearch to finish initializing
|
# Sleep to allow OpenSearch to finish initializing
|
||||||
# if it's not done doing whatever it does yet
|
# if it's not done doing whatever it does yet
|
||||||
echo -n "Waiting for OpenSearch"
|
echo -n "Waiting for OpenSearch"
|
||||||
|
@ -21,4 +25,11 @@ mix ecto.create
|
||||||
mix ecto.load
|
mix ecto.load
|
||||||
|
|
||||||
# Test the application
|
# 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},
|
{:mix_audit, "~> 2.1", only: [:dev, :test], runtime: false},
|
||||||
|
|
||||||
# Static analysis
|
# Static analysis
|
||||||
{:dialyxir, "~> 1.2", only: :dev, runtime: false},
|
{:dialyxir, "~> 1.2", only: [:dev, :test], runtime: false},
|
||||||
|
|
||||||
# Fixes for Elixir v1.15+
|
# Fixes for Elixir v1.15+
|
||||||
{:canary, "~> 1.1",
|
{:canary, "~> 1.1",
|
||||||
|
|
Loading…
Reference in a new issue