From c959cdf44ff33e3629f68a0d5af1a9f387c7f3d1 Mon Sep 17 00:00:00 2001 From: Carina Kothe Date: Wed, 13 Dec 2023 16:52:39 +0100 Subject: [PATCH] Unit test action --- .github/workflows/unit-test.yml | 45 +++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/unit-test.yml diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml new file mode 100644 index 0000000..4f0f0cc --- /dev/null +++ b/.github/workflows/unit-test.yml @@ -0,0 +1,45 @@ +name: Unit Tests + +env: + KYMA_STABILITY: "unstable" + KYMA: "./hack/kyma" + +on: + push: + branches: + - "main" + - "release-*" + paths-ignore: + - 'docs/**' + - '**.md' + - 'sec-scanners-config.yaml' + pull_request: + branches: + - "main" + - "release-*" + paths-ignore: + - 'docs/**' + - '**.md' + - 'sec-scanners-config.yaml' + +jobs: + unit-tests: + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Setup go environment + uses: actions/setup-go@v5 + with: + go-version: '1.21' + cache: false + + - name: Sync go dependencies + run: | + go mod tidy + go mod vendor + + - name: Run tests + run: | + make test