From 7a2c09fa0d10ae807bc7f1bface4dcfbdfe73a50 Mon Sep 17 00:00:00 2001 From: Sudhish <108091997+skrdgraph@users.noreply.github.com> Date: Fri, 16 Sep 2022 12:10:30 -0700 Subject: [PATCH] fix(test) add cleanup at start (#8307) * add cleanup at start * bring in changes from https://github.com/dgraph-io/dgraph/pull/8301 * cleanup --- .github/workflows/ci-dgraph-load-tests.yml | 11 ++++++++--- .github/workflows/ci-dgraph-tests.yml | 8 ++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-dgraph-load-tests.yml b/.github/workflows/ci-dgraph-load-tests.yml index 7e535558218..1bd4349f11e 100644 --- a/.github/workflows/ci-dgraph-load-tests.yml +++ b/.github/workflows/ci-dgraph-load-tests.yml @@ -9,6 +9,14 @@ on: schedule: - cron: "*/30 * * * *" jobs: + #TODO: WE NEED TO REMOVE THIS CLEANUP, and handle it more elegantly, it makes us incompatible with gh-hosted-runners + cleanup: + runs-on: self-hosted + container: + image: ubuntu:latest + steps: + - name: Cleaning up the $GITHUB_WORKSPACE as root from a Docker image + run: find /__w/${{ github.event.repository.name }}/${{ github.event.repository.name }}/. -name . -o -prune -exec rm -rf -- {} + || true dgraph-load-tests: runs-on: self-hosted steps: @@ -63,6 +71,3 @@ jobs: ./t --suite=load # clean up docker containers after test execution ./t -r - - name: Cleaning Up $GITHUB_WORKSPACE - # Volume auto mounted by gh actions pointing to the current working-directory - run: find /__w/${{ github.event.repository.name }}/${{ github.event.repository.name }}/. -name . -o -prune -exec rm -rf -- {} + || true diff --git a/.github/workflows/ci-dgraph-tests.yml b/.github/workflows/ci-dgraph-tests.yml index 7d0502b7127..f6827090ace 100644 --- a/.github/workflows/ci-dgraph-tests.yml +++ b/.github/workflows/ci-dgraph-tests.yml @@ -9,6 +9,14 @@ on: schedule: - cron: "*/30 * * * *" jobs: + #TODO: WE NEED TO REMOVE THIS CLEANUP, and handle it more elegantly, it makes us incompatible with gh-hosted-runners + cleanup: + runs-on: self-hosted + container: + image: ubuntu:latest + steps: + - name: Cleaning up the $GITHUB_WORKSPACE as root from a Docker image + run: find /__w/${{ github.event.repository.name }}/${{ github.event.repository.name }}/. -name . -o -prune -exec rm -rf -- {} + || true dgraph-tests: runs-on: self-hosted steps: