forked from red-hat-data-services/ods-ci
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feature/ODS-2600_Validate_DSC_creates_all_…
…Serverless_CRs
- Loading branch information
Showing
122 changed files
with
5,210 additions
and
3,031 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,34 +2,11 @@ name: Lint | |
on: [push, pull_request] | ||
|
||
jobs: | ||
run_lint: | ||
name: black formatter | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Get changed files | ||
id: changed-files | ||
uses: tj-actions/[email protected] | ||
|
||
- name: Install black formater | ||
run: pip install black | ||
|
||
- name: List all changed files | ||
run: | | ||
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do | ||
echo "$file was changed" | ||
if [[ $file == *.py ]]; then | ||
black $file --check --diff | ||
fi | ||
done | ||
run_shellcheck: | ||
name: shellcheck linter | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
- name: shellcheck_ | ||
uses: reviewdog/action-shellcheck@v1 | ||
with: | ||
|
@@ -46,7 +23,7 @@ jobs: | |
continue-on-error: true | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
|
@@ -58,27 +35,6 @@ jobs: | |
with: | ||
sarif_file: .sarif.json | ||
category: robocop | ||
isort_linter: | ||
name: isort | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Get changed files | ||
id: changed-files | ||
uses: tj-actions/[email protected] | ||
|
||
- name: Install isort linter | ||
run: pip install isort | ||
|
||
- name: List all changed files | ||
run: | | ||
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do | ||
echo "$file was changed" | ||
if [[ $file == *.py ]]; then | ||
isort $file --check --diff | ||
fi | ||
done | ||
ruff: | ||
name: ruff | ||
runs-on: ubuntu-latest | ||
|
@@ -94,7 +50,7 @@ jobs: | |
id: cached-home-local | ||
with: | ||
path: ~/.local | ||
key: ${{ runner.os }}-local-${{ env.poetry_version }} | ||
key: "${{ runner.os }}-local-${{ env.poetry_version }}" | ||
|
||
- name: Install poetry | ||
if: steps.cached-home-local.outputs.cache-hit != 'true' | ||
|
@@ -116,7 +72,13 @@ jobs: | |
- name: Install ruff | ||
run: poetry install --sync | ||
|
||
# run all liners in turn and don't fail fast | ||
|
||
- run: poetry run ruff check ods_ci/ | ||
if: "!cancelled()" | ||
|
||
- run: poetry run ruff format ods_ci/ --check --diff | ||
if: "!cancelled()" | ||
|
||
selftests: | ||
name: selftests | ||
|
@@ -133,7 +95,7 @@ jobs: | |
id: cached-home-local | ||
with: | ||
path: ~/.local | ||
key: ${{ runner.os }}-local-${{ env.poetry_version }} | ||
key: "${{ runner.os }}-local-${{ env.poetry_version }}" | ||
|
||
- name: Install poetry | ||
if: steps.cached-home-local.outputs.cache-hit != 'true' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.