Skip to content

Commit

Permalink
Merge pull request konflux-ci#60 from Troy876/RHTAPBUGS-763
Browse files Browse the repository at this point in the history
fix(RHTAPBUGS-763): run lint checks for prs
  • Loading branch information
johnbieren authored Sep 29, 2023
2 parents 2716cf0 + cd6071f commit 3dcdf43
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/build_and_push_image.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Build and push image
on:
push:
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Linters
'on':
pull_request:
branches:
- main
types:
- opened
- reopened
- synchronize
jobs:
yamllint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run yamllint
uses: frenck/action-yamllint@v1
gitlint:
name: Run gitlint checks
runs-on: ubuntu-20.04
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: '${{ github.event.pull_request.head.sha }}'
- name: Install gitlint into container
run: python -m pip install gitlint
- name: Run gitlint check
run: >-
gitlint --commits origin/${{ github.event.pull_request.base.ref
}}..HEAD
3 changes: 2 additions & 1 deletion .github/workflows/python.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Python Checks for Pull Requests
on:
pull_request:
Expand All @@ -16,7 +17,7 @@ jobs:
- name: Setup python environment for flake8 check
uses: actions/setup-python@v4
with:
python-version: "3.9" # Same as in Dockerfile
python-version: "3.9" # Same as in Dockerfile
- name: flake8 Lint
uses: py-actions/flake8@v2
- name: Run pytest
Expand Down

0 comments on commit 3dcdf43

Please sign in to comment.