Skip to content

Commit

Permalink
Make sure env is passed throught sudo
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartc committed Nov 7, 2024
1 parent 62da373 commit 170c8b2
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
name: "Install libsodium and sudo"
command: |
apt-get update && apt-get install -y libsodium-dev sudo
- run: chown -R lightning /home/lightning
- run: sudo -u lightning mix local.hex --force && mix local.rebar --force
- run: cd assets; sudo -u lightning npm install
Expand Down Expand Up @@ -108,30 +108,30 @@ workflows:
- build:
name: "Check code formatting"
execute:
- run: sudo -u lightning env MIX_ENV=test mix format --check-formatted
- run: sudo -Eu lightning env MIX_ENV=test mix format --check-formatted
- build:
name: "Check code style"
execute:
- run: sudo -u lightning env MIX_ENV=test mix credo --strict --all
- run: sudo -Eu lightning env MIX_ENV=test mix credo --strict --all
- build:
name: "Type check"
execute:
- run: sudo -u lightning env MIX_ENV=test mix dialyzer
- run: sudo -Eu lightning env MIX_ENV=test mix dialyzer
- build:
name: "Check for security vulnerabilities"
execute:
- run: sudo -u lightning env MIX_ENV=test mix sobelow
- run: sudo -Eu lightning env MIX_ENV=test mix sobelow
- build:
name: "Check Elixir tests (codecov)"
execute:
- run: sudo -u lightning env MIX_ENV=test mix do ecto.create, ecto.migrate
- run: sudo -Eu lightning env MIX_ENV=test mix do ecto.create, ecto.migrate
- run:
command: sudo -u lightning env MIX_ENV=test mix coveralls.json -o ./test/reports
command: sudo -Eu lightning env MIX_ENV=test mix coveralls.json -o ./test/reports
- codecov/upload:
file: test/reports/excoveralls.json
- store_test_results:
path: test/reports/
- build:
name: "Check Javascript tests"
execute:
- run: cd assets; sudo -u lightning npm install && npm run test-report
- run: cd assets; sudo -Eu lightning npm install && npm run test-report

0 comments on commit 170c8b2

Please sign in to comment.