Skip to content

Commit

Permalink
CI: output fixes
Browse files Browse the repository at this point in the history
- sanity: capture the output for all the versions of Python for the summary
- ansible-lint: display the output of ansible-lint on the PR in the job detail view
- ansible-lint: use colors like in Sanity Check
- check-all-dependencies-are-merged: do not checkout the code
  • Loading branch information
fredericlepied committed Dec 20, 2023
1 parent 31a9903 commit de3f63f
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
types: [opened, synchronize, reopened]
jobs:
ansible-lint:
name: Compute ansible-lint score
name: ansible-lint check
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -34,10 +34,10 @@ jobs:
export PYTHONHASHSEED=42
git checkout -b branch
git fetch --unshallow origin main
cmd="ansible-lint --parseable --nocolor --profile=shared"
cmd="ansible-lint --parseable --force-color --profile=shared"
# don't want to annotate through GHA
unset GITHUB_ACTIONS
$cmd > branch.output || echo "Branch linting output written"
$cmd | tee branch.output || echo "Branch linting output written"
git checkout main
$cmd > main.output || echo "Main linting output written"
export GITHUB_ACTIONS=true
Expand Down Expand Up @@ -89,11 +89,11 @@ jobs:
git fetch --unshallow origin main
for version in 3.6 3.7 3.8 3.9 ; do
ansible-test sanity --verbose --docker --python $version --color --coverage --failure-ok
done 2>&1 | tee branch.output
done 2>&1 | tee -a branch.output
git checkout main
for version in 3.6 3.7 3.8 3.9 ; do
ansible-test sanity --verbose --docker --python $version --color --coverage --failure-ok
done > main.output 2>&1
done >> main.output 2>&1
for key in branch main; do
grep -E "(ERROR|FATAL):" "$key.output" |
grep -v "issue(s) which need to be resolved\|See error output above for details." |
Expand All @@ -118,8 +118,6 @@ jobs:
name: "Check all dependencies are merged"
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Check all dependent Pull Requests are merged
uses: depends-on/depends-on-action@main
Expand Down

0 comments on commit de3f63f

Please sign in to comment.