-
Notifications
You must be signed in to change notification settings - Fork 223
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
use github actions for pre-commit checks #1658
Conversation
🌐 Coverage report
|
f965d59
to
877fcf9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great. Once we merge this (probably with admin privs) we'll want to update the branch protections to target the new test.
.pre-commit-config.yaml
Outdated
- repo: https://gitlab.com/pycqa/flake8 | ||
rev: 3.8.4 | ||
rev: 3.9.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not latest? 5.0.4
And we should target github, not their mirror on gitlab.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch, updated in 7823421
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to avoid have to check for new version you can add .github/dependabot.yaml
file like this one
version: 2
updates:
# GitHub actions dependencies
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
# Python dependencies (Optional)
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kuisathaverat from what I can tell, dependabot doesn't support updating the pre-commit hook versions themselves: dependabot/dependabot-core#1524
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but keep GitHub Actions versions updated .github/workflows/pre-commit.yml
thanks @basepi for the heads-up
…ith-k8s-skaffold * upstream/main: bump python versions and use docker slim versions (elastic#1661) use github actions for pre-commit checks (elastic#1658) Use typing.TypeVar on decorators' type hints (elastic#1655) Use minimum of 5 seconds for interval between central config calls (elastic#1652) fix errors in pymongo tests introduced in elastic#1639 (elastic#1648) only use content-type and content-encoding headers for POSTing events (elastic#1651) fix starlette 0.21 tests (elastic#1653)
What does this pull request do?
Recently, a new release of
importlib-metadata
broke our pre-commit setup on Jenkins. The issue is that we runpre-commit
in a Python 3.7 docker container. However, we can't use a more recent Python image, as that won't work with the deprecated pre-commit install script we use.When we had issues with pre-commit/linting the last time, we discussed using a Github Action instead. This PR implements this.