2021-12-21 11:22:47 +00:00
|
|
|
name: WoboqBuilder
|
|
|
|
env:
|
|
|
|
# Force the stdout and stderr streams to be unbuffered
|
|
|
|
PYTHONUNBUFFERED: 1
|
|
|
|
|
|
|
|
concurrency:
|
2021-12-21 11:23:17 +00:00
|
|
|
group: woboq
|
2021-12-21 11:22:47 +00:00
|
|
|
on: # yamllint disable-line rule:truthy
|
2021-12-22 10:50:26 +00:00
|
|
|
workflow_dispatch:
|
2023-05-09 19:59:49 +00:00
|
|
|
workflow_call:
|
2021-12-21 11:22:47 +00:00
|
|
|
jobs:
|
|
|
|
# don't use dockerhub push because this image updates so rarely
|
|
|
|
WoboqCodebrowser:
|
|
|
|
runs-on: [self-hosted, style-checker]
|
|
|
|
steps:
|
|
|
|
- name: Set envs
|
|
|
|
run: |
|
|
|
|
cat >> "$GITHUB_ENV" << 'EOF'
|
|
|
|
TEMP_PATH=${{runner.temp}}/codebrowser
|
|
|
|
REPO_COPY=${{runner.temp}}/codebrowser/ClickHouse
|
|
|
|
IMAGES_PATH=${{runner.temp}}/images_path
|
|
|
|
EOF
|
|
|
|
- name: Check out repository code
|
2022-12-23 16:54:19 +00:00
|
|
|
uses: ClickHouse/checkout@v1
|
2021-12-21 11:22:47 +00:00
|
|
|
with:
|
2022-12-20 00:07:58 +00:00
|
|
|
clear-repository: true
|
2021-12-21 11:22:47 +00:00
|
|
|
submodules: 'true'
|
2023-05-09 19:59:49 +00:00
|
|
|
- name: Download json reports
|
|
|
|
uses: actions/download-artifact@v3
|
|
|
|
with:
|
|
|
|
path: ${{ env.IMAGES_PATH }}
|
2021-12-21 11:22:47 +00:00
|
|
|
- name: Codebrowser
|
|
|
|
run: |
|
2022-01-13 18:06:35 +00:00
|
|
|
sudo rm -fr "$TEMP_PATH"
|
|
|
|
mkdir -p "$TEMP_PATH"
|
|
|
|
cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH"
|
|
|
|
cd "$REPO_COPY/tests/ci" && python3 codebrowser_check.py
|
2021-12-21 11:22:47 +00:00
|
|
|
- name: Cleanup
|
|
|
|
if: always()
|
|
|
|
run: |
|
2022-09-17 18:24:56 +00:00
|
|
|
docker ps --quiet | xargs --no-run-if-empty docker kill ||:
|
|
|
|
docker ps --all --quiet | xargs --no-run-if-empty docker rm -f ||:
|
2022-01-13 18:06:35 +00:00
|
|
|
sudo rm -fr "$TEMP_PATH"
|