From 6d9b96ad4d6f7f69d2c4513ce8b290afef842fd0 Mon Sep 17 00:00:00 2001 From: Igor Sudak Date: Mon, 1 Apr 2024 10:41:02 +0200 Subject: [PATCH] Update GH workflows --- .github/workflows/preflight-summary.yml | 6 +++--- .github/workflows/preflight.yml | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/preflight-summary.yml b/.github/workflows/preflight-summary.yml index e807c46..6a75119 100644 --- a/.github/workflows/preflight-summary.yml +++ b/.github/workflows/preflight-summary.yml @@ -49,10 +49,10 @@ jobs: - name: Generate Preflight Summary run: | { - JOB_URL="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/${{github.event.workflow_run.id }}" - printf "[%s]($JOB_URL \"Go to Job Summary\")\n\n" "$(< test-summary.md)" - printf "### Code Coverage Summary\n" + cat test-summary.md + printf "\n### Code Coverage Summary\n" cat code-coverage-results.md + JOB_URL="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/${{github.event.workflow_run.id }}" printf "\nView full reports on the [Job Summary]($JOB_URL \"Go to Job Summary\") page\n\n" cat {pylint,black,isort,bandit}-report.md > linter-reports.md 2>/dev/null || true diff --git a/.github/workflows/preflight.yml b/.github/workflows/preflight.yml index 7a78565..3e4e0fd 100644 --- a/.github/workflows/preflight.yml +++ b/.github/workflows/preflight.yml @@ -67,7 +67,7 @@ jobs: filters: | py: - added|modified: '**/*.py' - cacher: + src: - added|modified: 'alma_tests_cacher/**/*.py' - added|modified: '*.py' @@ -80,10 +80,10 @@ jobs: --cov-report=term | tee $REPORTS_DIR/pytest-output.txt" - name: Run pylint - if: ${{ steps.changed-files.outputs.cacher == 'true' }} + if: ${{ steps.changed-files.outputs.src == 'true' }} run: | docker compose run --rm cacher bash -c " - pylint --exit-zero ${{ steps.changed-files.outputs.cacher_files }} \ + pylint --exit-zero ${{ steps.changed-files.outputs.src_files }} \ | tee $REPORTS_DIR/pylint-report.txt" - name: Run black @@ -101,10 +101,10 @@ jobs: | tee >(sed 's/\x1B\[[0-9;]*m//g' > $REPORTS_DIR/isort-report.txt)" - name: Run bandit - if: ${{ steps.changed-files.outputs.cacher == 'true' }} + if: ${{ steps.changed-files.outputs.src == 'true' }} run: | docker compose run --rm cacher bash -c " - bandit -c pyproject.toml ${{ steps.changed-files.outputs.cacher_files }} \ + bandit -c pyproject.toml ${{ steps.changed-files.outputs.src_files }} \ | tee >(sed 's/\x1B\[[0-9;]*m//g' > $REPORTS_DIR/bandit-report.txt)" - name: Generate .md reports