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

chore(ci/api): use pytest-github-actions-annotate-failures #275

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

c0rydoras
Copy link
Collaborator

No description provided.

@c0rydoras c0rydoras added backend This issue or pull request is backend related enhancement This issue or pull request discusses non feature changes github_actions Pull requests that update GitHub Actions code labels Mar 8, 2024
@c0rydoras c0rydoras requested a review from hairmare March 8, 2024 14:54
@c0rydoras c0rydoras self-assigned this Mar 8, 2024
@@ -31,5 +31,7 @@ jobs:
run: docker compose up -d --build db api
- name: Check for missing migrations
run: docker compose exec -T api ./manage.py makemigrations --check --dry-run --no-input
- name: Install pytest-github-actions-annotate-failures
run: docker compose run --rm -T api pip install pytest-github-actions-annotate-failures
Copy link

Choose a reason for hiding this comment

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

i'm not 💯 convinced this will work, maybe you also need to ensure that the GITHUB_TOKEN env var gets passed into the container where the actual tests are run.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

You are probably right, it didn't annotate any of the ~50 warnings

hairmare
hairmare previously approved these changes Mar 8, 2024
@c0rydoras c0rydoras force-pushed the chore/tests/pytest-github-actions-annotate-failures branch 11 times, most recently from 4846aba to d2cabbd Compare March 11, 2024 09:25
- name: Run backend tests
run: make api-test
- name: Run tests
run: docker-compose run --rm -T api sh -c 'pip install pytest-github-actions-annotate-failures && GITHUB_ACTIONS=true ENV=test PYTEST_RUN_PATH=/app pytest --no-cov-on-fail --cov -vvv -s'

Choose a reason for hiding this comment

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

why not use the --env / -e flags to pass envs?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

i did that, sadly it doesn't look like the screenshot
image

Choose a reason for hiding this comment

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

🤔

@c0rydoras c0rydoras force-pushed the chore/tests/pytest-github-actions-annotate-failures branch from d2cabbd to 4e59f29 Compare March 11, 2024 12:35
@c0rydoras c0rydoras force-pushed the chore/tests/pytest-github-actions-annotate-failures branch from 4e59f29 to 238a6eb Compare March 11, 2024 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend This issue or pull request is backend related enhancement This issue or pull request discusses non feature changes github_actions Pull requests that update GitHub Actions code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants