improve ci

This commit is contained in:
shibao 2023-02-04 22:06:18 -05:00 committed by oliviasculley
parent fd0b2c455a
commit ebe09bcf84
3 changed files with 15 additions and 10 deletions

View File

@ -13,20 +13,24 @@ steps:
mount:
- _build
- deps
- assets/node_modules/
- .npm
- .mix
- name: test
image: elixir:1.14.1-alpine
environment:
TEST_DATABASE_URL: ecto://postgres:postgres@database/lokal_test
HOST: testing.example.tld
MIX_HOME: /drone/src/.mix
MIX_ARCHIVES: /drone/src/.mix/archives
MIX_ENV: test
commands:
- apk add --no-cache build-base npm git python3
- mix local.rebar --force
- mix local.hex --force
- apk add --no-cache build-base npm git
- mix local.rebar --force --if-missing
- mix local.hex --force --if-missing
- mix deps.get
- mix deps.compile
- npm --prefix ./assets ci --progress=false --no-audit --loglevel=error
- npm set cache .npm
- npm --prefix ./assets ci --no-audit --prefer-offline
- npm run --prefix ./assets deploy
- mix do phx.digest, gettext.extract
- mix test.all
@ -76,7 +80,8 @@ steps:
mount:
- _build
- deps
- assets/node_modules/
- .npm
- .mix
services:
- name: database

View File

@ -1,3 +1,3 @@
elixir 1.14.1-otp-25
erlang 25.1.2
nodejs 18.12.1
nodejs 18.9.1

View File

@ -3,8 +3,8 @@
"description": " ",
"license": "MIT",
"engines": {
"node": "18.12.1",
"npm": "8.19.2"
"node": "v18.9.1",
"npm": "8.10.0"
},
"scripts": {
"deploy": "NODE_ENV=production webpack --mode production",