Skip to content

Commit

Permalink
Add pronto to ci (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
Arpan-Kreeti authored Oct 20, 2020
1 parent 74cd9d4 commit 57fcb05
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/elixir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
key: ${{ runner.os }}-${{ steps.setup-elixir.otp-version }}-${{ steps.setup-elixir.elixir-version }}-plts-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}

- name: Create PLTs when cache miss
if: steps.plt-cache.outputs.cache-hit != 'true'
if: steps.plt-cache.outputs.cache-hit != 'true' # If plt cache was not found create plt directory and create plts
run: |
mkdir -p priv/plts
mix dialyzer --plt
Expand All @@ -66,5 +66,16 @@ jobs:
- name: Run Sobelow
run: mix sobelow --exit

# - name: Run Credo
# run: mix credo --strict
# Pronto
- name: Setup Ruby
uses: actions/setup-ruby@v1
with:
ruby-version: '2.6'

- name: Setup pronto for credo
run: gem install pronto-credo --no-document

- run: git fetch # This is required otherwise `pronto run -f github_pr -c origin/master` wont work

- name: Run pronto
run: PRONTO_PULL_REQUEST_ID="$(jq --raw-output .number "$GITHUB_EVENT_PATH")" PRONTO_GITHUB_ACCESS_TOKEN="${{ github.token }}" pronto run -f github_pr -c origin/master
4 changes: 2 additions & 2 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ defmodule BokBok.MixProject do
"ecto.setup": ["ecto.create", "ecto.migrate", "run priv/repo/seeds.exs"],
"ecto.reset": ["ecto.drop", "ecto.setup"],
test: ["ecto.create --quiet", "ecto.migrate", "test"],
# Run static code analysis tools and tests to check code quality
quality: ["format", "credo --strict", "sobelow --verbose", "dialyzer", "test"]
# Run static code analysis tools to check code quality
quality: ["format", "sobelow --verbose", "dialyzer", "credo --strict"]
]
end
end

0 comments on commit 57fcb05

Please sign in to comment.