2021-12-24 12:56:03 +00:00
|
|
|
name: JepsenWorkflow
|
|
|
|
env:
|
|
|
|
# Force the stdout and stderr streams to be unbuffered
|
|
|
|
PYTHONUNBUFFERED: 1
|
|
|
|
concurrency:
|
|
|
|
group: jepsen
|
|
|
|
on: # yamllint disable-line rule:truthy
|
|
|
|
schedule:
|
|
|
|
- cron: '0 */6 * * *'
|
|
|
|
workflow_dispatch:
|
2022-05-27 12:37:11 +00:00
|
|
|
workflow_call:
|
2021-12-24 12:56:03 +00:00
|
|
|
jobs:
|
|
|
|
KeeperJepsenRelease:
|
|
|
|
runs-on: [self-hosted, style-checker]
|
|
|
|
steps:
|
|
|
|
- name: Set envs
|
|
|
|
run: |
|
|
|
|
cat >> "$GITHUB_ENV" << 'EOF'
|
|
|
|
TEMP_PATH=${{runner.temp}}/keeper_jepsen
|
|
|
|
REPO_COPY=${{runner.temp}}/keeper_jepsen/ClickHouse
|
|
|
|
EOF
|
|
|
|
- name: Clear repository
|
|
|
|
run: |
|
2022-01-13 18:06:35 +00:00
|
|
|
sudo rm -fr "$GITHUB_WORKSPACE" && mkdir "$GITHUB_WORKSPACE"
|
2021-12-24 12:56:03 +00:00
|
|
|
- name: Check out repository code
|
|
|
|
uses: actions/checkout@v2
|
2021-12-24 18:26:06 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2021-12-24 12:56:03 +00:00
|
|
|
- name: Jepsen Test
|
|
|
|
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"
|
2021-12-24 12:56:03 +00:00
|
|
|
python3 keeper_jepsen_check.py
|
|
|
|
- name: Cleanup
|
|
|
|
if: always()
|
|
|
|
run: |
|
2022-05-16 19:19:57 +00:00
|
|
|
# shellcheck disable=SC2046
|
|
|
|
docker kill $(docker ps -q) ||:
|
|
|
|
# shellcheck disable=SC2046
|
|
|
|
docker rm -f $(docker ps -a -q) ||:
|
2022-01-13 18:06:35 +00:00
|
|
|
sudo rm -fr "$TEMP_PATH"
|