-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ab0fe08
commit 37cc00d
Showing
1 changed file
with
40 additions
and
0 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,40 @@ | ||
name: formatting check | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
inputs: | ||
manual: | ||
description: "Trigger manually" | ||
required: false | ||
|
||
jobs: | ||
format: | ||
name: formatting check | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Get Python version | ||
id: get-python-versions | ||
run: | | ||
MINIMUM_VERSION=$(grep -oP '__version_minimum_python__ = "\K.*(?=")' hn_sdk/_version.py) | ||
echo "CURRENT_VERSION=$MINIMUM_VERSION" >> $GITHUB_ENV | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ env.CURRENT_VERSION }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
make deps-dev | ||
- name: Check Formatting | ||
run: make fmt-check |