name: Test on: push: branches: - '*' paths: - '.gitea/**' - 'src/**' - 'mon/**' - 'json11' - 'cpp-btree' - 'tests/**' env: BUILDENV_IMAGE: git.yourcmc.ru/vitalif/vitastor/buildenv TEST_IMAGE: git.yourcmc.ru/vitalif/vitastor/test OSD_ARGS: '--etcd_quick_timeout 2000' concurrency: group: ci-${{ github.ref }} cancel-in-progress: true jobs: buildenv: runs-on: ubuntu-latest container: git.yourcmc.ru/vitalif/gitea-ci-dind steps: - uses: actions/checkout@v3 - name: Build and push run: | set -ex if ! docker manifest inspect $BUILDENV_IMAGE >/dev/null; then docker build -t $BUILDENV_IMAGE -f .gitea/workflows/buildenv.Dockerfile . docker login git.yourcmc.ru -u vitalif -p "${{secrets.TOKEN}}" docker push $BUILDENV_IMAGE fi build: runs-on: ubuntu-latest needs: buildenv container: git.yourcmc.ru/vitalif/gitea-ci-dind steps: - uses: actions/checkout@v3 with: submodules: true - name: Build and push run: | set -ex if ! docker manifest inspect $TEST_IMAGE:$GITHUB_SHA >/dev/null; then docker build -t $TEST_IMAGE:$GITHUB_SHA -f .gitea/workflows/test.Dockerfile . docker login git.yourcmc.ru -u vitalif -p "${{secrets.TOKEN}}" docker push $TEST_IMAGE:$GITHUB_SHA fi make_test: runs-on: ubuntu-latest needs: build container: ${{env.TEST_IMAGE}}:${{github.sha}} steps: # leak sanitizer sometimes crashes - run: cd /root/vitastor/build && ASAN_OPTIONS=detect_leaks=0 make -j16 test test_heal_pg_size_2: runs-on: ubuntu-latest needs: build container: ${{env.TEST_IMAGE}}:${{github.sha}} steps: - name: Run test id: test timeout-minutes: 1000 run: PG_SIZE=2 /root/vitastor/tests/test_heal.sh - name: Print logs if: always() && steps.test.outcome == 'failure' run: | for i in /root/vitastor/testdata/*.log /root/vitastor/testdata/*.txt; do echo "-------- $i --------" cat $i echo "" done test_heal_ec: runs-on: ubuntu-latest needs: build container: ${{env.TEST_IMAGE}}:${{github.sha}} steps: - name: Run test id: test timeout-minutes: 1000 run: SCHEME=ec /root/vitastor/tests/test_heal.sh - name: Print logs if: always() && steps.test.outcome == 'failure' run: | for i in /root/vitastor/testdata/*.log /root/vitastor/testdata/*.txt; do echo "-------- $i --------" cat $i echo "" done test_heal_csum_32k_dmj: runs-on: ubuntu-latest needs: build container: ${{env.TEST_IMAGE}}:${{github.sha}} steps: - name: Run test id: test timeout-minutes: 1000 run: TEST_NAME=csum_32k_dmj OSD_ARGS="--data_csum_type crc32c --csum_block_size 32k --inmemory_metadata false --inmemory_journal false" OFFSET_ARGS=$OSD_ARGS /root/vitastor/tests/test_heal.sh - name: Print logs if: always() && steps.test.outcome == 'failure' run: | for i in /root/vitastor/testdata/*.log /root/vitastor/testdata/*.txt; do echo "-------- $i --------" cat $i echo "" done test_heal_csum_32k_dj: runs-on: ubuntu-latest needs: build container: ${{env.TEST_IMAGE}}:${{github.sha}} steps: - name: Run test id: test timeout-minutes: 1000 run: TEST_NAME=csum_32k_dj OSD_ARGS="--data_csum_type crc32c --csum_block_size 32k --inmemory_journal false" OFFSET_ARGS=$OSD_ARGS /root/vitastor/tests/test_heal.sh - name: Print logs if: always() && steps.test.outcome == 'failure' run: | for i in /root/vitastor/testdata/*.log /root/vitastor/testdata/*.txt; do echo "-------- $i --------" cat $i echo "" done test_heal_csum_32k: runs-on: ubuntu-latest needs: build container: ${{env.TEST_IMAGE}}:${{github.sha}} steps: - name: Run test id: test timeout-minutes: 1000 run: TEST_NAME=csum_32k OSD_ARGS="--data_csum_type crc32c --csum_block_size 32k" OFFSET_ARGS=$OSD_ARGS /root/vitastor/tests/test_heal.sh - name: Print logs if: always() && steps.test.outcome == 'failure' run: | for i in /root/vitastor/testdata/*.log /root/vitastor/testdata/*.txt; do echo "-------- $i --------" cat $i echo "" done test_heal_csum_4k_dmj: runs-on: ubuntu-latest needs: build container: ${{env.TEST_IMAGE}}:${{github.sha}} steps: - name: Run test id: test timeout-minutes: 1000 run: TEST_NAME=csum_4k_dmj OSD_ARGS="--data_csum_type crc32c --inmemory_metadata false --inmemory_journal false" OFFSET_ARGS=$OSD_ARGS /root/vitastor/tests/test_heal.sh - name: Print logs if: always() && steps.test.outcome == 'failure' run: | for i in /root/vitastor/testdata/*.log /root/vitastor/testdata/*.txt; do echo "-------- $i --------" cat $i echo "" done test_heal_csum_4k_dj: runs-on: ubuntu-latest needs: build container: ${{env.TEST_IMAGE}}:${{github.sha}} steps: - name: Run test id: test timeout-minutes: 1000 run: TEST_NAME=csum_4k_dj OSD_ARGS="--data_csum_type crc32c --inmemory_journal false" OFFSET_ARGS=$OSD_ARGS /root/vitastor/tests/test_heal.sh - name: Print logs if: always() && steps.test.outcome == 'failure' run: | for i in /root/vitastor/testdata/*.log /root/vitastor/testdata/*.txt; do echo "-------- $i --------" cat $i echo "" done test_heal_csum_4k: runs-on: ubuntu-latest needs: build container: ${{env.TEST_IMAGE}}:${{github.sha}} steps: - name: Run test id: test timeout-minutes: 1000 run: TEST_NAME=csum_4k OSD_ARGS="--data_csum_type crc32c" OFFSET_ARGS=$OSD_ARGS /root/vitastor/tests/test_heal.sh - name: Print logs if: always() && steps.test.outcome == 'failure' run: | for i in /root/vitastor/testdata/*.log /root/vitastor/testdata/*.txt; do echo "-------- $i --------" cat $i echo "" done