-
Notifications
You must be signed in to change notification settings - Fork 0
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
[POWEROPS-2558] chore: linters and codecov in workflows #406
Changes from all commits
dcec364
2f1baa8
09965b3
26f9d15
25819a2
6af72af
3243478
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,26 +8,6 @@ env: | |
PYTHON_VERSION: "3.9" | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.9" | ||
|
||
# The installation is required as mypy must be run in the local system environment, not in the pre-commit environment. | ||
- name: Install required dependencies | ||
run: | | ||
python3 -m pip install --upgrade pip poetry | ||
poetry config virtualenvs.create false | ||
poetry install | ||
|
||
- name: Linting and static code checks | ||
run: | | ||
pre-commit run --all-files | ||
|
||
Comment on lines
-11
to
-30
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. question: Not needed here because we do it in build.yml? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yea, no need to re-run pre-commit on merge to main given the branch protections and strict requirements for passing on PRs toward main |
||
test_and_release: | ||
runs-on: ubuntu-latest | ||
environment: CD | ||
|
@@ -45,12 +25,17 @@ jobs: | |
|
||
- name: Test | ||
env: | ||
CI: 1 | ||
run: pytest --skipcdf | ||
SETTINGS__COGNITE__CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }} | ||
SETTINGS__COGNITE__CLIENT_ID: ${{ vars.CLIENT_ID }} | ||
SETTINGS__COGNITE__PROJECT: ${{ vars.PROJECT }} | ||
SETTINGS__COGNITE__CDF_CLUSTER: ${{ vars.CLUSTER }} | ||
SETTINGS__COGNITE__TENANT_ID: ${{ vars.TENANT_ID }} | ||
SETTINGS__COGNITE__LOGIN_FLOW: "client_credentials" | ||
run: pytest --cov --cov-report term --cov-report xml:coverage.xml | ||
|
||
- uses: codecov/codecov-action@v4 | ||
with: | ||
file: ./coverage.xml | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
- name: Build package | ||
run: poetry build | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
2. Use vanilla Python logging: | ||
``` | ||
import logging | ||
|
||
logger = logging.getLogger(__name__) | ||
``` | ||
|
||
|
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.
question: Is this pointing to environment variables in the CI environment? I don't see them there.
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.
They're on the repo level because all the envs need them