Skip to content

Commit

Permalink
Update README and introduce linting (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
rafidka authored Dec 19, 2023
1 parent c3cdc77 commit 57e733a
Show file tree
Hide file tree
Showing 7 changed files with 79 additions and 8 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/bash-lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Lint Bash Scripts

on: [push, pull_request]

jobs:
shellcheck:
name: ShellCheck
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v2

- name: Install ShellCheck
run: sudo apt install shellcheck

- name: Run ShellCheck
run: ./lint_bash.sh
23 changes: 23 additions & 0 deletions .github/workflows/python-lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Lint Python Scripts

on: [push, pull_request]

jobs:
flake8:
name: Flake8
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.12"

- name: Install Flake8
run: pip install flake8

- name: Run Flake8
run: ./lint_python.sh
12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
## My Project
## aws-mwaa-docker-images

TODO: Fill this README out!

Be sure to:

* Change the title in this README
* Edit your repository description on GitHub
This repository contains the Docker Images that [Amazon MWAA](https://aws.amazon.com/managed-workflows-for-apache-airflow/)
will use in future versions of Airflow. Eventually, we will deprecate [aws-mwaa-local-runner](https://github.com/aws/aws-mwaa-local-runner)
in favour of this package. However, at this point, this repository is still under development.

## Security

Expand All @@ -14,4 +11,3 @@ See [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more inform
## License

This project is licensed under the Apache-2.0 License.

11 changes: 11 additions & 0 deletions dummy.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
"""Dummy Python file to test Flake8 integration."""


def main(msg: str) -> None:
"""Entry point of the script."""
print("This is a dummy script to test Flake8 integration.")
print(f"Printing user message: {msg}")


if __name__ == '__main__':
main("Hello!")
3 changes: 3 additions & 0 deletions dummy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

echo "This is a dummy script to test ShellCheck integration."
10 changes: 10 additions & 0 deletions lint_bash.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

# Lint all Bash files
echo "Running ShellCheck on Bash scripts..."
if ! find . -type f -name "*.sh" -exec shellcheck {} +; then
echo "ShellCheck linting failed."
exit 1
else
echo "ShellCheck linting passed."
fi
10 changes: 10 additions & 0 deletions lint_python.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

# Lint all Python files
echo "Running Flake8 on Python files..."
if ! flake8 .; then
echo "Flake8 linting failed."
exit 1
else
echo "Flake8 linting passed."
fi

0 comments on commit 57e733a

Please sign in to comment.