-
Notifications
You must be signed in to change notification settings - Fork 0
ci: create separate workflows for code-quality #8
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
Changes from all commits
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "pip" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
fail-on-severity: 'low' | ||
allow-licenses: | ||
- 'BSD-2-Clause' | ||
- 'BSD-3-Clause' | ||
- 'BSD-3-Clause-Clear' | ||
- 'BSD-2-Clause-Views' | ||
- 'MIT' | ||
- 'Apache-2.0' | ||
- 'ISC' | ||
- 'BlueOak-1.0.0' | ||
- '0BSD' | ||
- 'Python-2.0' | ||
- 'LGPL-3.0' | ||
- 'MPL-2.0' | ||
fail-on-scopes: | ||
- 'runtime' | ||
- 'development' | ||
- 'unknown' | ||
license-check: true | ||
vulnerability-check: true | ||
allow-dependencies-licenses: | ||
- 'pkg:pypi/PyGithub@2.2.0' | ||
- 'pkg:pypi/psycopg2-binary' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: 'Prepare test environment' | ||
inputs: | ||
PYTHON_VERSION: | ||
description: 'Python version to use' | ||
required: true | ||
SOURCE_PATH: | ||
description: 'Path to the source code directory' | ||
required: false | ||
default: 'src' | ||
type: string | ||
VIRTUALENV_PATH: | ||
description: 'Virtualenv path' | ||
required: false | ||
default: 'virtualenv' | ||
type: string | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Checkout main repository | ||
uses: actions/checkout@v4 | ||
with: | ||
path: ${{ inputs.SOURCE_PATH }} | ||
fetch-depth: 0 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ inputs.PYTHON_VERSION }} | ||
cache: 'pip' | ||
|
||
- name: Install dependencies | ||
shell: bash | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m venv ${{ inputs.VIRTUALENV_PATH }} | ||
source ${{ inputs.VIRTUALENV_PATH }}/*/activate | ||
python --version | ||
pip install ./${{ inputs.SOURCE_PATH }} | ||
pip install -r ${{ inputs.SOURCE_PATH }}/requirements-test.txt | ||
pip install -r ${{ inputs.SOURCE_PATH }}/requirements-dev.txt | ||
pip install -r ${{ inputs.SOURCE_PATH }}/requirements.txt |
Original file line number | Diff line number | Diff line change | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,30 @@ | |||||||||||||||||||||||
name: Check Code Standard | |||||||||||||||||||||||
|
|||||||||||||||||||||||
on: | |||||||||||||||||||||||
pull_request: | |||||||||||||||||||||||
types: [opened, synchronize] | |||||||||||||||||||||||
|
|||||||||||||||||||||||
env: | |||||||||||||||||||||||
SOURCE_PATH: 'src' | |||||||||||||||||||||||
VIRTUALENV_PATH: 'virtualenv' | |||||||||||||||||||||||
|
|||||||||||||||||||||||
jobs: | |||||||||||||||||||||||
run_check_standard: | |||||||||||||||||||||||
strategy: | |||||||||||||||||||||||
fail-fast: false | |||||||||||||||||||||||
matrix: | |||||||||||||||||||||||
python_version: ['3.10', '3.13'] | |||||||||||||||||||||||
runs-on: ubuntu-latest | |||||||||||||||||||||||
steps: | |||||||||||||||||||||||
- name: Checkout this repository | |||||||||||||||||||||||
uses: actions/checkout@v4 | |||||||||||||||||||||||
with: | |||||||||||||||||||||||
path: current_repo | |||||||||||||||||||||||
- uses: ./current_repo/.github/prepare_test_env | |||||||||||||||||||||||
with: | |||||||||||||||||||||||
PYTHON_VERSION: ${{ matrix.python_version }} | |||||||||||||||||||||||
- name: Run mfd-code-standard | |||||||||||||||||||||||
shell: bash | |||||||||||||||||||||||
run: | | |||||||||||||||||||||||
source ${{ github.workspace }}/${{ env.VIRTUALENV_PATH }}/*/activate | |||||||||||||||||||||||
adrianlasota marked this conversation as resolved.
Show resolved
Hide resolved
|
|||||||||||||||||||||||
mfd-code-standard --project-dir ${{ github.workspace }}/${{ env.SOURCE_PATH }} | |||||||||||||||||||||||
Comment on lines
+13
to
+30
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
Copilot AutofixAI 7 days ago To fix this issue, you should explicitly declare a
Suggested changeset
1
.github/workflows/check_code_standard.yml
Copilot is powered by AI and may make mistakes. Always verify output.
Positive FeedbackNegative Feedback
Refresh and try again.
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,12 @@ | ||||||||||||||||||||||||||||||||
name: Title + Commit Validation | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
on: | ||||||||||||||||||||||||||||||||
pull_request: | ||||||||||||||||||||||||||||||||
types: [opened, synchronize] | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
jobs: | ||||||||||||||||||||||||||||||||
validate_pr_format: | ||||||||||||||||||||||||||||||||
uses: intel/mfd/.github/workflows/check_pr_format.yml@main | ||||||||||||||||||||||||||||||||
with: | ||||||||||||||||||||||||||||||||
REPOSITORY_NAME: ${{ github.event.pull_request.head.repo.full_name }} | ||||||||||||||||||||||||||||||||
BRANCH_NAME: ${{ github.head_ref }} | ||||||||||||||||||||||||||||||||
Comment on lines
+9
to
+12
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
Copilot AutofixAI 7 days ago To fix the problem, set a
Suggested changeset
1
.github/workflows/check_pr_format.yml
Copilot is powered by AI and may make mistakes. Always verify output.
Positive FeedbackNegative Feedback
Refresh and try again.
|
Uh oh!
There was an error while loading. Please reload this page.