Skip to content

Update python Docker tag to v3.13 #2020

Update python Docker tag to v3.13

Update python Docker tag to v3.13 #2020

name: check_coding_rule
on:
push:
branches:
- main
- develop
pull_request:
jobs:
check_coding_rule:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
example:
- minimum_user
- 2nd_obc_user
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version-file: .github/workflows/.python-version
architecture: 'x64'
- name: setup
shell: bash
run: ./setup.sh
- name: check coding rule
id: check
shell: bash -e {0}
continue-on-error: true
working-directory: ./Examples/${{ matrix.example }}/src
run: |
python ./src_core/Script/CI/check_coding_rule.py ./src_core/Script/CI/check_coding_rule.json | tee /tmp/coding-rule.log
status="${PIPESTATUS[0]}"
echo "status: ${status}"
echo "status=${status}" >> "$GITHUB_OUTPUT"
exit "${status}"
- name: install reviewdog
uses: reviewdog/[email protected]
- name: fix error log source file path
run: |
sed 's/.\/src_core\///g' < /tmp/coding-rule.log \
| > ./coding-rule.log \
sed 's/.\/src_user/Examples\/${{ matrix.example }}\/src\/src_user/g'
cat ./coding-rule.log
- name: reviewdog(github-pr-review)
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
reviewdog \
-name 'check_coding_rule' \
-level error \
-fail-on-error=true \
-filter-mode=added \
-diff="git diff FETCH_HEAD" \
-reporter=github-pr-review \
-efm="%-GThe above files are invalid coding rule." \
-efm="%E%f: %l: %m" \
-efm="%Z%s" \
< coding-rule.log
- name: exit
shell: bash
run: |
exit $(( "${{ steps.check.outputs.status }}" ))