From 0ffda4f86b3f15b91417ac1ea1d91c4a13f707c8 Mon Sep 17 00:00:00 2001 From: alanprot Date: Fri, 29 Nov 2024 11:20:15 -0800 Subject: [PATCH] run tests Signed-off-by: alanprot --- .github/workflows/test-build-deploy.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.github/workflows/test-build-deploy.yml b/.github/workflows/test-build-deploy.yml index 1a6d7c43..0adc1677 100644 --- a/.github/workflows/test-build-deploy.yml +++ b/.github/workflows/test-build-deploy.yml @@ -28,3 +28,26 @@ jobs: ln -s $GITHUB_WORKSPACE/* /go/src/github.com/cortexproject/weaveworks-common - name: Lint run: make lint + - name: CheckProtos + run: make check-protos + + test: + runs-on: ubuntu-20.04 + container: + image: quay.io/cortexproject/build-image:master-0ddced051 + steps: + - name: Checkout Repo + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - name: Setup Git safe.directory + run: | + echo "this step is needed because when running in container, actions/checkout does not set safe.directory effectively." + echo "See https://github.com/actions/runner/issues/2033. We should use --system instead of --global" + git config --system --add safe.directory $GITHUB_WORKSPACE + # Commands in the Makefile are hardcoded with an assumed file structure of the CI container + # Symlink ensures paths specified in previous commands don’t break + - name: Sym Link Expected Path to Workspace + run: | + mkdir -p /go/src/github.com/cortexproject/weaveworks-common + ln -s $GITHUB_WORKSPACE/* /go/src/github.com/cortexproject/weaveworks-common + - name: Test + run: make test