Linting and Formatting #2
This file contains hidden or 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: Linting | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
lint-dotnet: | |
name: Lint .NET | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: '7.0.x' | |
- name: Lint | |
run: dotnet format -v diag --verify-no-changes --report=format.json | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: format-report | |
path: format.json | |
lint-python: | |
name: Lint Python | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
- name: Install Ruff | |
run: pip install ruff | |
- name: Check formatting | |
run: ruff format --check | |
- name: Check lints | |
run: ruff check |