Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(app): lint yaml #6159

Merged
merged 1 commit into from
Nov 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,35 @@ jobs:
run: |
terraform fmt -recursive -check

lint-yaml:
name: Lint (YAML)
runs-on: ubuntu-22.04
timeout-minutes: 10
steps:
- name: Cancel previous runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Checkout
uses: actions/checkout@v3
- name: Install Poetry
run: |
pipx install poetry
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'poetry'
- name: Set Poetry environment
run: |
poetry env use 3.11
- name: Install dependencies
run: |
poetry install --no-root
- name: Lint YAML
run: |
poetry run poe lint-yaml

static-type-check-python:
name: Static Type Check (Python)
runs-on: ubuntu-22.04
Expand Down
2 changes: 2 additions & 0 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ pull_request_rules:
- check-success=Lint (Ruby)
- check-success=Lint (Shell)
- check-success=Lint (Terraform)
- check-success=Lint (YAML)
- check-success=Static Type Check (Python)
- check-success=Static Type Check (Terraform)
- check-success=Static Type Check (TypeScript)
Expand Down Expand Up @@ -58,6 +59,7 @@ pull_request_rules:
- check-success=Lint (Ruby)
- check-success=Lint (Shell)
- check-success=Lint (Terraform)
- check-success=Lint (YAML)
- check-success=Static Type Check (Python)
- check-success=Static Type Check (Terraform)
- check-success=Static Type Check (TypeScript)
Expand Down
18 changes: 9 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,6 @@ poetry-add:
poetry-add-dev:
poetry add xxx --group=dev

static-type-check-python:
poetry run poe static-type-check-python --package=api-python
poetry run poe static-type-check-python --package=convolutional-neural-network
poetry run poe static-type-check-python --package=graph-neural-network
poetry run poe static-type-check-python --package=hm-locust
poetry run poe static-type-check-python --package=hm-opal-client
poetry run poe static-type-check-python --package=hm-prefect
poetry run poe static-type-check-python --package=hm-pyspark
poetry run poe static-type-check-python --package=quantum-computing
lint-python-black:
poetry run poe lint-python-black
lint-python-black-fix:
Expand All @@ -112,6 +103,15 @@ lint-python-isort-fix:
poetry run poe lint-python-isort-fix
lint-yaml:
poetry run poe lint-yaml
static-type-check-python:
poetry run poe static-type-check-python --package=api-python
poetry run poe static-type-check-python --package=convolutional-neural-network
poetry run poe static-type-check-python --package=graph-neural-network
poetry run poe static-type-check-python --package=hm-locust
poetry run poe static-type-check-python --package=hm-opal-client
poetry run poe static-type-check-python --package=hm-prefect
poetry run poe static-type-check-python --package=hm-pyspark
poetry run poe static-type-check-python --package=quantum-computing

# Lint
lint-dockerfile:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.poe.tasks]
static-type-check-python = "mypy --install-types --non-interactive"
lint-python-black = "black . --check"
lint-python-black-fix = "black ."
lint-python-flake8 = "flake8 ."
lint-python-isort = "isort . --check-only"
lint-python-isort-fix = "isort ."
lint-yaml = "yamllint ."
static-type-check-python = "mypy --install-types --non-interactive"