-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
### Motivation and Context This PR adds a Lint Github workflow so that code style rules can be enforced for PRs. 1. This forms a baseline workflow that can be used as a template for future workflows that will be added. 2. It helps enforce code style rules. Currently it only checks PyCodeStyle and PyFlakes. Others will be added in the future. 3. Contributes to automated testing 4. Does not fix any open issue. ### Description Added Ruff as a dev dependency. Added Github workflow which runs Ruff. --------- Co-authored-by: Aditya Gudimella <adgudime@microsoft.com> Co-authored-by: Devis Lucato <dluc@users.noreply.github.com>
- Loading branch information
1 parent
b636d9d
commit 79d24c1
Showing
4 changed files
with
79 additions
and
3 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Lint | ||
on: push | ||
# concurrency: | ||
# group: lint-${{ github.ref }} | ||
# cancel-in-progress: true | ||
|
||
jobs: | ||
ruff: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.8"] | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
- run: echo "/root/.local/bin" >> $GITHUB_PATH | ||
- uses: actions/checkout@v3 | ||
- name: Install poetry | ||
run: pipx install poetry | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: "poetry" | ||
cache-dependency-path: "python/pyproject.toml" | ||
- name: Install SemanticKernel | ||
run: cd python && poetry install --no-ansi | ||
- name: Run lint | ||
run: cd python && poetry run ruff check . | ||
black: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.8"] | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
- run: echo "/root/.local/bin" >> $GITHUB_PATH | ||
- uses: actions/checkout@v3 | ||
- name: Install poetry | ||
run: pipx install poetry | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: "poetry" | ||
cache-dependency-path: "python/pyproject.toml" | ||
- name: Install SemanticKernel | ||
run: cd python && poetry install --no-ansi | ||
- name: Run lint | ||
run: cd python && poetry run black --check . |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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