Skip to content

Create CI workflow#100

Open
AndS9 wants to merge 8 commits into
mate-academy:mainfrom
AndS9:develop
Open

Create CI workflow#100
AndS9 wants to merge 8 commits into
mate-academy:mainfrom
AndS9:develop

Conversation

@AndS9

@AndS9 AndS9 commented Jul 5, 2026

Copy link
Copy Markdown

No description provided.

AndS9 added 6 commits July 3, 2026 19:44

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

I am requesting changes because there are a few critical issues that prevent the workflow from reliably fulfilling the assignment requirements. First, the env.PythonVersion is set to 3.14 (around line 14), which is not a real Python release; this will cause actions/setup-python to fail and the workflow cannot run at all—update this to a supported 3.x version like 3.10 or 3.11 to stay compatible with Django 4. Second, the test step (Test application, around line 39) and the coverage generation step are marked with continue-on-error: true, which means failing tests or coverage issues will not fail the job, contradicting the requirement that only flake8 style and complexity checks should be non-blocking. Third, the artifact upload step (around lines 56–59) specifies only name: python-code and no path, so no Python files are actually uploaded, and the artifact requirement is not met; you should add a path such as path: . or path: ./src depending on your project structure.

To fix this, 1) set PythonVersion to a valid, supported version (e.g., 3.10), 2) remove continue-on-error from the main test and coverage steps so that failures there block the workflow, and 3) add a proper path to the upload-artifact step so your Python code is archived. Aside from these blockers, the rest of the workflow structure—triggers, job name, flake8 steps, and coverage commands—is well aligned with the requirements, so you are very close to a correct solution. Once you address these items, your workflow should both run successfully and accurately enforce the project’s CI expectations.


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Important

Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.

Tip

If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.

Caution

Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.

Footnotes

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

Comment thread .github/workflows/main.yml Outdated
jobs:
python-ci:
env:
PythonVersion: 3.14

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using PythonVersion: 3.14 will cause actions/setup-python to fail because Python 3.14 is not released; the description expects a real 3.8+ version for Django 4. Consider setting this to a currently supported version like 3.10 or 3.11 so the workflow can run successfully.

Comment thread .github/workflows/main.yml Outdated

- name: Test application
run: python manage.py test
continue-on-error: true

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test step is marked continue-on-error: true, so failing tests won’t fail the workflow. The requirements only specify that flake8 style/complexity checks should be non-blocking; tests should normally block the workflow so that PR checks only pass when tests succeed.

Comment thread .github/workflows/main.yml Outdated

- name: Generate coverage report
run: coverage run manage.py test
continue-on-error: true

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similarly to the test step, making coverage generation non-blocking means coverage failures won’t fail the workflow. For CI robustness, consider letting this step fail the job so coverage issues are visible, while keeping only the flake8 checks non-blocking as required.

Comment on lines +56 to +59
- name: Upload python code as an artifact
uses: actions/upload-artifact@v4
with:
name: python-code

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This artifact upload step defines only a name but no path, so no files will actually be uploaded. To satisfy the requirement to upload Python code as an artifact, add a path (e.g., path: . or path: ./src) containing the Python source you want to archive.

AndS9 added 2 commits July 5, 2026 20:21
Updated Python version and removed continue-on-error for tests.

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

I am approving your solution because your GitHub Actions workflow now correctly implements all the core CI requirements for this assignment. The workflow triggers on pushes to main and develop and on pull requests to main, and the run-name properly includes both github.actor and github.sha, so runs are clearly identifiable. The python-ci job sets the Python version via an environment variable (PythonVersion: 3.11), installs dependencies with pip install -r requirements.txt, runs python manage.py test, generates coverage with coverage run manage.py test, and prints the coverage report with coverage report, which matches the required behavior. You also run flake8 twice (for style and complexity) with continue-on-error: true, making those checks non-blocking as specified, and you upload the Python code as an artifact using actions/upload-artifact with a valid path.

No critical blockers remain; the only considerations are minor, such as the assumption that manage.py and requirements.txt live under ./src and the small typo in the run name (Action triggerd). If your project structure differs, you may need to adjust defaults.run.working-directory, and you can optionally fix the typo to improve readability in the Actions UI. Overall, this is a solid CI configuration that meets the task’s functional requirements and demonstrates good use of GitHub Actions.


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Footnotes

  1. Rate AI review example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants