Skip to content

Apply format if needed #369

Apply format if needed

Apply format if needed #369

Workflow file for this run

name: Pull Request
on: pull_request
env:
SLN_FILE: Fabulous.sln
CONFIG: Release
jobs:
format:
name: Format
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.x
- run: dotnet tool restore
- name: Format
run: find . -name '*.fs' | xargs dotnet fantomas
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Apply formatting"
commit_options: '--no-verify --signoff'
repository: .
skip_dirty_check: false
skip_fetch: false
skip_checkout: true
disable_globbing: true
create_branch: false
pull_request:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
# - name: Check code formatting
# run: |
# dotnet tool restore
# dotnet fantomas --check src
- name: Restore
run: dotnet restore ${SLN_FILE}
- name: Build
run: dotnet build ${SLN_FILE} -c ${CONFIG} --no-restore
- name: Test
run: dotnet test ${SLN_FILE} -c ${CONFIG} --no-build