mix needs to use --stdin-filename to support non-elixir files like .heex
#596
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Changed formatters | |
on: [pull_request] | |
jobs: | |
formatters: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout pull request | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
# No shallow clone, we want to be able to compare PR branch | |
# to main. | |
fetch-depth: 0 | |
- name: Test changed formatters | |
run: | | |
set -euo pipefail | |
mkdir -p .tmp | |
make docker CMD="make fmt-changed > .tmp/changed" | |
export FORMATTERS="$(< .tmp/changed)" | |
if [[ -n "${FORMATTERS}" ]]; then | |
make fmt-build fmt-docker CMD="make fmt-test" | |
fi |