Skip to content

Commit

Permalink
hard mode done
Browse files Browse the repository at this point in the history
  • Loading branch information
Caposto committed Feb 7, 2025
1 parent 72ae497 commit cdbef34
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 3 deletions.
25 changes: 24 additions & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -1 +1,24 @@
IMPLEMENT THIS FILE
# IMPLEMENT THIS FILE

# Create a GitHub Action that runs the Python linter of your choice
# on both pull requests and pushes to the main branch.
# Hint - refer to the README.md

name: "Lint and Formatting"
on: # TODO:
jobs:
lint:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "pip"
- name: Install dependencies
# TODO:
- name: Lint
# TODO:
- name: Format
# TODO:
5 changes: 4 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
IMPLEMENT THIS FILE
# IMPLEMENT THIS FILE

# Create a GitHub Action that runs the Python tests
# on both pull requests and pushes to the main branch.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,16 @@ If you would like a challenge, uncheck the option to "Copy the main branch only"

You are now ready to implement the GitHub actions for linting/formatting and testing.

The task in "hard-mode" is to implement the following files:
- `test/test.py`
- `.github/workflows/lint.yml`
- `.github/workflows/test.yml`

If completed successfully, you should be able to create a pull request and
see the GitHub actions run on your pull request. If you get stuck we
created the solutions in `solutions` directory.


### Setting up Linting/Formatter

To run the formatter
Expand Down
2 changes: 1 addition & 1 deletion solutions/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Lint
run: |
pip install pylint
pylint --fail-under=9.5 src/
pylint src/
- name: Format
run: |
pip install black
Expand Down

0 comments on commit cdbef34

Please sign in to comment.