Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

83 add linting to GitHub test automation #84

Closed
wants to merge 36 commits into from

Conversation

tylers-username
Copy link
Collaborator

@tylers-username tylers-username commented Nov 3, 2023

Closes #83 | Closes #85

Summarized Changes

  • .github/workflows/test.yaml - Add new lint/prettier commands to github MR tests
  • backend/app/**/*.py - Python files were updated to meet to linting and prettier requirements
  • backend/requirements.txt - Adds pylint and black for linting/prettier
  • backend/scripts/lint_backend.sh & backend/scripts/prettier_backend.sh - Adds scripts for use with github workflow
  • frontend/* - Files updated to meet linting and prettier requirements
  • package.json(s) - each updated to include linting/prettier packages and tests

@tylers-username tylers-username linked an issue Nov 3, 2023 that may be closed by this pull request
Copy link

github-actions bot commented Nov 3, 2023

Hello, and thank you for contributing to the Upsun demo project!

Setting up tests

Most tests will run automatically when you open a pull request, while others require contributors with write access to enable.
Until all tests pass, a pull request will not be merged.

enable instructions tbd

Failing tests

If your PR is failing, see the Running tests section of the README for troubleshooting details.

Reviewing these changes locally:

  1. Clone this repo

    git clone -b 83-add-linting-to-github-test-automation [email protected]:platformsh/demo-project.git demo-test-83-add-linting-to-github-test-automation && cd demo-test-83-add-linting-to-github-test-automation
  2. Create a project on Upsun:

    upsun project:create --title "Demo Project test (pr-84/merge)" --default-branch 83-add-linting-to-github-test-automation

    This command will set the local repository remote automatically, but you will need to specify the organization and region.

  3. Push to Upsun:

    upsun push

@tylers-username
Copy link
Collaborator Author

tylers-username commented Nov 3, 2023

@chadwcarlson - I'm going to pause on this one to reduce noise to the commit log. Feel free to update the code if you know what the issue is.

Locally, the new linting and prettier commands work as expected.

While running, the GitHub checks are (1) failing to use the Python packages installed by npm install and (2) they keep aborting with "This check was canceled".

Once the .github/workflows/test.yaml is worked out, this MR is ready.

@chadwcarlson
Copy link
Contributor

chadwcarlson commented Nov 5, 2023

@tylers-username Based on the error, I would guess we need to add activate the venv to use black.

For example - pip-audit in test.sh

@tylers-username
Copy link
Collaborator Author

@chadwcarlson - I was going to sneak some corrections into the Upsun DEMO CI/demo-runthrough test, but I don't have permission to manage the project that is being created.

I think the biggest step is implementing a 28 character limit on branch names and project titles for Upsun within these tests.

@tylers-username tylers-username marked this pull request as ready for review November 8, 2023 16:09
@tylers-username
Copy link
Collaborator Author

@chadwcarlson - I was going to sneak some corrections into the Upsun DEMO CI/demo-runthrough test, but I don't have permission to manage the project that is being created.

I think the biggest step is implementing a 28 character limit on branch names and project titles for Upsun within these tests.

@chadwcarlson I restored .github/workflows/project.yaml to the state that we currently have in the main branch. This MR is ready for review.

auto-merge was automatically disabled November 9, 2023 17:36

Pull request was closed

@chadwcarlson chadwcarlson deleted the 83-add-linting-to-github-test-automation branch November 9, 2023 17:36
@chadwcarlson chadwcarlson mentioned this pull request Nov 9, 2023
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.

Branch name in created environment has a limit Add linting to github test automation
2 participants