-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Elixir and Phoenix and all deps #395
base: main
Are you sure you want to change the base?
Changes from all commits
5d0dc9d
e1b35f1
72fe620
b347eda
d3d54a6
71c6cbe
3d24f78
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
[] | ||
[ | ||
{"lib/phoenix_starter/workers/reportable.ex", :extra_range, 30}, | ||
{"lib/phoenix_starter/workers/error_reporter.ex", :guard_fail, 19}, | ||
{"lib/phoenix_starter_web/controllers/user_registration_controller.ex", :pattern_match, 16} | ||
] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,18 @@ | ||
_build/ | ||
.git/ | ||
*.ez | ||
.* | ||
.elixir_ls/ | ||
.git/ | ||
/priv/static/assets/ | ||
/priv/static/cache_manifest.json | ||
Dockerfile | ||
README.md | ||
_build/ | ||
assets/node_modules/ | ||
cover/ | ||
deps/ | ||
doc/ | ||
erl_crash.dump | ||
priv/static | ||
test | ||
README.md | ||
Dockerfile | ||
.* | ||
test/ | ||
tmp/ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
[ | ||
import_deps: [:ecto, :phoenix], | ||
inputs: ["*.{ex,exs}", "priv/*/seeds.exs", "{config,lib,test}/**/*.{ex,exs}"], | ||
subdirectories: ["priv/*/migrations"] | ||
inputs: ["*.{heex,ex,exs}", "priv/*/seeds.exs", "{config,lib,test}/**/*.{heex,ex,exs}"], | ||
subdirectories: ["priv/*/migrations"], | ||
plugins: [Phoenix.LiveView.HTMLFormatter] | ||
] |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,8 +18,8 @@ jobs: | |
|
||
strategy: | ||
matrix: | ||
elixir: ["1.13.2"] | ||
otp: ["24.2.1"] | ||
elixir: ["1.13.4"] | ||
otp: ["25.0.3"] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
@@ -55,9 +55,9 @@ jobs: | |
|
||
strategy: | ||
matrix: | ||
elixir: ["1.13.2"] | ||
otp: ["24.2.1"] | ||
node: ["14.13.1"] | ||
elixir: ["1.13.4"] | ||
otp: ["25.0.3"] | ||
node: ["18.7.0"] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
@@ -82,16 +82,7 @@ jobs: | |
|
||
- name: Install Node dependencies | ||
run: npm --prefix assets ci | ||
- run: npx prettier --check . | ||
working-directory: ./assets | ||
- run: npx stylelint "css/*" | ||
working-directory: ./assets | ||
- run: npx eslint js --ext .js,.jsx,.ts,.tsx | ||
working-directory: ./assets | ||
- run: npm run deploy | ||
env: | ||
NODE_ENV: production | ||
working-directory: ./assets | ||
- run: npm --prefix assets run ci | ||
|
||
lint: | ||
name: Lint | ||
|
@@ -102,8 +93,8 @@ jobs: | |
|
||
strategy: | ||
matrix: | ||
elixir: ["1.13.2"] | ||
otp: ["24.2.1"] | ||
elixir: ["1.13.4"] | ||
otp: ["25.0.3"] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
@@ -141,8 +132,8 @@ jobs: | |
|
||
strategy: | ||
matrix: | ||
elixir: ["1.13.2"] | ||
otp: ["24.2.1"] | ||
elixir: ["1.13.4"] | ||
otp: ["25.0.3"] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
@@ -174,9 +165,7 @@ jobs: | |
|
||
- name: Create PLTs | ||
if: steps.plt-cache.outputs.cache-hit != 'true' | ||
run: | | ||
mkdir -p priv/plts | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No longer needed, Dialyxir does this automatically now. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
mix dialyzer --plt | ||
run: mix dialyzer --plt | ||
|
||
- run: mix dialyzer --no-check --format github | ||
|
||
|
@@ -190,8 +179,8 @@ jobs: | |
|
||
strategy: | ||
matrix: | ||
elixir: ["1.13.2"] | ||
otp: ["24.2.1"] | ||
elixir: ["1.13.4"] | ||
otp: ["25.0.3"] | ||
|
||
services: | ||
db: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
erlang 24.2.1 | ||
elixir 1.13.2-otp-24 | ||
nodejs 16.13.2 | ||
erlang 25.0.3 | ||
elixir 1.13.4-otp-25 | ||
nodejs 18.7.0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,9 +23,11 @@ ENV MIX_ENV=prod | |
|
||
WORKDIR /opt/app | ||
|
||
COPY config config | ||
COPY mix.* ./ | ||
RUN mix do deps.get --only=$MIX_ENV, deps.compile | ||
COPY mix.exs mix.lock ./ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The changes here are mostly due to how Docker caches. Each line creates a new layer. Based on what needs to be recompiled, separating some steps and copying at different points helps maximize the Docker cache, which speeds up the build. These are picked up from the new Phoenix default Dockerfile. |
||
RUN mix deps.get --only=$MIX_ENV | ||
|
||
COPY config/config.exs config/${MIX_ENV}.exs config/ | ||
RUN mix deps.compile | ||
|
||
# Assets builder | ||
# --------------- | ||
|
@@ -52,8 +54,15 @@ WORKDIR /opt/app | |
COPY --from=assets-build /opt/app/priv/static priv/static | ||
RUN mix phx.digest | ||
|
||
COPY . . | ||
RUN mix do compile, deps.compile sentry --force, release --quiet | ||
COPY priv priv | ||
COPY lib lib | ||
|
||
RUN mix do compile, deps.compile sentry --force | ||
|
||
COPY config/runtime.exs config/ | ||
COPY rel rel | ||
|
||
RUN mix release | ||
|
||
# App final | ||
# --------- | ||
|
@@ -70,8 +79,7 @@ RUN apk --no-cache --update add \ | |
|
||
WORKDIR /opt/app | ||
|
||
COPY --from=release /opt/app/_build/prod/rel/phoenix_starter ./ | ||
RUN chown -R nobody: /opt/app | ||
COPY --from=release --chown=nobody: /opt/app/_build/prod/rel/phoenix_starter ./ | ||
USER nobody | ||
|
||
EXPOSE ${PORT} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.eslintrc.js | ||
postcss.config.js | ||
tailwind.config.js |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was running web pack, which we no longer need to do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ngscheurich Is there a lint we can run for Typescript to ensure our types pass? I think this deploy step was added to get the TS checks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, esbuild does not do any type-checking so we'll still need to depend on the
typescript
package and runnpx tsc --noEmit
in CI.