chore: reorder drone steps for speed improvements
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Simon 2025-12-04 17:37:52 +01:00
parent acd6d79efe
commit e959d069f2
Signed by: simon
GPG key ID: 40E7A58C4AA1EDB2

View file

@ -28,33 +28,24 @@ steps:
restore: true
mount:
- ./deps
- ./_build
- ./.hex-cache
ttl: 30
volumes:
- name: cache
path: /cache
- name: lint
- name: setup
image: docker.io/library/elixir:1.18.3-otp-27
depends_on:
- restore-cache
environment:
HEX_HOME: ./.hex-cache
MIX_HOME: ./.hex-cache
commands:
# Install hex package manager
# Install hex package manager (uses cached .hex-cache if available)
- mix local.hex --force
# Fetch dependencies
- mix deps.get
# Check for compilation errors & warnings
- mix compile --warnings-as-errors
# Check formatting
- mix format --check-formatted
# Security checks
- mix sobelow --config
# Check dependencies for known vulnerabilities
- mix deps.audit
# Check for dependencies that are not maintained anymore
- mix hex.audit
# Provide hints for improving code quality
- mix credo
# Check that translations are up to date
- mix gettext.extract --check-up-to-date
- name: wait_for_postgres
image: docker.io/library/postgres:17.6
@ -72,30 +63,70 @@ steps:
echo "Postgres did not become available, aborting."
exit 1
- name: compile
image: docker.io/library/elixir:1.18.3-otp-27
depends_on:
- setup
environment:
HEX_HOME: ./.hex-cache
MIX_HOME: ./.hex-cache
commands:
# Compile for dev (with warnings as errors) and test environments
- mix compile --warnings-as-errors
- MIX_ENV=test mix compile --warnings-as-errors
- name: lint
image: docker.io/library/elixir:1.18.3-otp-27
depends_on:
- compile
environment:
HEX_HOME: ./.hex-cache
MIX_HOME: ./.hex-cache
commands:
# Check formatting
- mix format --check-formatted
# Security checks
- mix sobelow --config
# Check dependencies for known vulnerabilities
- mix deps.audit
# Check for dependencies that are not maintained anymore
- mix hex.audit
# Provide hints for improving code quality
- mix credo
# Check that translations are up to date
- mix gettext.extract --check-up-to-date
- name: test
image: docker.io/library/elixir:1.18.3-otp-27
depends_on:
- compile
- wait_for_postgres
environment:
MIX_ENV: test
TEST_POSTGRES_HOST: postgres
TEST_POSTGRES_PORT: 5432
HEX_HOME: ./.hex-cache
MIX_HOME: ./.hex-cache
commands:
# Install hex package manager
- mix local.hex --force
# Fetch dependencies
- mix deps.get
# Run tests
- mix test
# Run tests with increased parallelism
- mix test --max-cases 16
- name: rebuild-cache
image: drillster/drone-volume-cache
depends_on:
- lint
- test
settings:
rebuild: true
mount:
- ./deps
- ./_build
- ./.hex-cache
volumes:
- name: cache
path: /cache
when:
status:
- success
volumes:
- name: cache