Skip to content

Commit

Permalink
Add step to check lint in pull requests (#460)
Browse files Browse the repository at this point in the history
* Add step to check lint in pull requests

* Use os.EX_DATAERR instead of os.EX_NOTFOUND (available in Unix only)
  • Loading branch information
leplatrem authored Nov 17, 2022
1 parent 66136e2 commit ff97e8b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/test-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,16 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v2


- name: Check code lint
uses: docker/build-push-action@v2
with:
context: .
file: docker/Dockerfile
push: false
target: "lint"
tags: ghcr.io/${{ github.repository }}:${{ github.sha }}-lint

- name: Verify production image builds
uses: docker/build-push-action@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion ctms/bin/acoustic_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def main(dbsession, args=None) -> int:
)
if not row:
print(f"Unknown field '{args.tablename}.{args.field}'. Give up.")
return os.EX_NOTFOUND
return os.EX_DATAERR
dbsession.delete(row)
dbsession.commit()
print("Removed.")
Expand Down

0 comments on commit ff97e8b

Please sign in to comment.