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

Fix failing tests #322

Open
wants to merge 39 commits into
base: development
Choose a base branch
from
Open

Conversation

AviGawande
Copy link
Contributor

@AviGawande AviGawande commented Sep 11, 2024

This PR fixes the failing tests when raised a PR or committed changes into the base branch due to some internal conflicts.

Summary by Sourcery

Fix the failing tests by updating GitHub Actions workflows to handle private repository access and adjust system package installations.

CI:

  • Update GitHub Actions workflows to configure Git for cloning private repositories using a GitHub token.
  • Modify the installation of Python dependencies in style and flake8 workflows to include a private repository using a GitHub token.

AviGawande and others added 30 commits August 15, 2024 15:42
* Add plugins to autodeployment with docker
* Implement option to add link to privacy policy
* add footer link for event + organizer
* Replace pkg_resources with import importlib_metadata
* Do not repeat questions in form field of ticket form
* implement customer feature
* implement customer SSO provider & client
* add docs for customer functions
* Use master branch in docker-pr workflow

* Update workflow test postgres version to 12
* fix-252: Adapt design of ticketing pages to match talk component

---------

Co-authored-by: Mario Behling <[email protected]>
Co-authored-by: Tri Truong <[email protected]>
Co-authored-by: lcduong <[email protected]>
… before (fossasia#277)

* implement script to create customer account for customer placed order before
* update popup content when user join online event
* update join_online_event placeholder

* update mobile view for ticket layout
fossasia#289)

* add space between notification and header

* update translation for menu bar

* remove duplicate messageid
* update translation for user dropdown menu
* update dummy data and update link to eventyay.com

* update git workflow

* update docs

---------

Co-authored-by: lcduong <[email protected]>
Copy link

sourcery-ai bot commented Sep 11, 2024

Reviewer's Guide by Sourcery

This pull request addresses failing tests in the CI pipeline by updating GitHub Actions workflows. The changes primarily focus on improving the setup for private repository access, updating system dependencies, and modifying the installation process for Python packages.

File-Level Changes

Change Details Files
Improve GitHub Actions workflow for running tests
  • Add step to set up Git for cloning private repositories
  • Update formatting of branch names in workflow triggers
  • Add more detailed steps for installing dependencies and running tests
  • Improve caching and error handling in the workflow
.github/workflows/tests.yml
Update dependency installation in style check workflows
  • Add installation of a private GitHub repository using a token
  • Update pip install commands to include the private repository
.github/workflows/style.yml
Update system package installation in documentation and string check workflows
  • Replace 'enchant' with 'libenchant-2-2' in system package installation
.github/workflows/docs.yml
.github/workflows/strings.yml

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • Continue your discussion with Sourcery by replying directly to review comments.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @AviGawande - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟡 Security: 2 issues found
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

@@ -25,39 +25,54 @@ jobs:
python-version: 3.11
steps:
- uses: actions/checkout@v2

# Set up Git for cloning private repositories
- name: Set up Git for cloning private repositories
Copy link

Choose a reason for hiding this comment

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

🚨 suggestion (security): Consider using GitHub's built-in GITHUB_TOKEN for improved security

Instead of using a custom GH_TOKEN, consider using the built-in GITHUB_TOKEN which is automatically created for each workflow run and has the necessary permissions. This would eliminate the need to manage a separate secret and reduce potential security risks.

      - name: Set up Git for cloning private repositories
        run: |
          git config --global url."https://${{ github.token }}@github.com/".insteadOf "https://github.com/"

run: pip3 install -e ".[dev]" psycopg2-binary
run: |
pip3 install -e ".[dev]" psycopg2-binary
pip3 install git+https://${{ secrets.GITHUB_TOKEN }}:[email protected]/fossasia/eventyay-tickets-stripe.git@master
Copy link

Choose a reason for hiding this comment

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

🚨 suggestion (security): Consider using a more secure method for installing private packages

While using GITHUB_TOKEN is better than a custom token, consider using a more secure method for installing private packages. You could use GitHub Packages or a private PyPI server, which would provide better access control and versioning.

      - name: Install dependencies
        run: |
          pip3 install -e ".[dev]" psycopg2-binary
          pip config set global.extra-index-url https://github-package-registry.fossasia.org/
          pip3 install eventyay-tickets-stripe
        env:
          PIP_EXTRA_INDEX_URL: https://github-package-registry.fossasia.org/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok fixed.

Copy link

Choose a reason for hiding this comment

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

Great! I'm glad you were able to address the suggestion. Using a more secure method for installing private packages is definitely a good practice. If you have any further questions or need additional assistance, feel free to ask. Keep up the good work!

@mariobehling
Copy link
Member

It would be great if you fix the latest code of the project and resolve the conflicts.

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.

6 participants