Skip to content

Commit

Permalink
#431 Refactor Linter for CI pipeline (#435)
Browse files Browse the repository at this point in the history
* #431 Refactor Linter for CI pipeline

Signed-off-by: Tisham Dhar <[email protected]>

* #431 Add git executable flag

Signed-off-by: Tisham Dhar <[email protected]>
  • Loading branch information
Tisham Dhar authored Oct 9, 2020
1 parent b49400d commit 5bf70c2
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: Linting

on:
pull_request:
paths:
- '**'

push:
paths:
- '**'

env:
ORG: opendatacube
IMAGE: ows
DB_USERNAME: opendatacubeusername

jobs:
quality-check:
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Build Dev OWS image
run: |
docker build \
--target env_builder \
--tag ${ORG}/${IMAGE}:_builder \
.
- name: Lint dev OWS image
run: |
docker run ${ORG}/${IMAGE}:_builder /bin/sh -c "./lint-code.sh"
6 changes: 6 additions & 0 deletions lint-code.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
set -eu
set -x

pylint -j 2 --reports no datacube_ows --disable=C,R

set +x

0 comments on commit 5bf70c2

Please sign in to comment.