diff --git a/.github/workflows/pull-with-lifecycle-manager.yaml b/.github/workflows/pull-with-lifecycle-manager.yaml index 00b210d9..c0832f9b 100644 --- a/.github/workflows/pull-with-lifecycle-manager.yaml +++ b/.github/workflows/pull-with-lifecycle-manager.yaml @@ -8,11 +8,11 @@ env: on: pull_request: - branches: [ "main" ] + branches: ["main"] paths-ignore: - - 'docs/**' - - '**.md' - - 'sec-scanners-config.yaml' + - "docs/**" + - "**.md" + - "sec-scanners-config.yaml" jobs: e2e: @@ -21,6 +21,18 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: Cache Go dependencies + uses: actions/setup-go@v5 + with: + go-version-file: "./go.mod" + + - name: Cache Binaries + id: cache-binaries + uses: actions/cache@v3 + with: + path: bin + key: ${{ runner.os }}-bin + - name: Install k3d tools run: | make -C hack/ci/ install-k3d-tools diff --git a/.github/workflows/pull-without-lifecycle-manager.yml b/.github/workflows/pull-without-lifecycle-manager.yml index a51c9cd4..b709df75 100644 --- a/.github/workflows/pull-without-lifecycle-manager.yml +++ b/.github/workflows/pull-without-lifecycle-manager.yml @@ -8,11 +8,11 @@ env: on: pull_request: - branches: [ "main" ] + branches: ["main"] paths-ignore: - - 'docs/**' - - '**.md' - - 'sec-scanners-config.yaml' + - "docs/**" + - "**.md" + - "sec-scanners-config.yaml" jobs: e2e: @@ -24,9 +24,14 @@ jobs: - name: Cache Go dependencies uses: actions/setup-go@v5 with: - go-version-file: './go.mod' - check-latest: true - cache-dependency-path: './go.sum' + go-version-file: "./go.mod" + + - name: Cache Binaries + id: cache-binaries + uses: actions/cache@v3 + with: + path: bin + key: ${{ runner.os }}-bin - name: Install k3d tools run: | @@ -82,36 +87,35 @@ jobs: run: | make e2e-cleanup - -# the following steps only run on failure to help finding the cause of the failure + # the following steps only run on failure to help finding the cause of the failure - name: List CRDs - if: failure() + if: failure() run: | kubectl get crd - name: List Namespaces - if: failure() + if: failure() run: | kubectl get namespaces - name: List StatefulSets - if: failure() + if: failure() run: | kubectl get sts --all-namespaces - name: List Pods - if: failure() + if: failure() run: | kubectl get po --all-namespaces - name: List PVCs - if: failure() + if: failure() run: | kubectl get pvc --all-namespaces - name: List NATS CR - if: failure() + if: failure() run: | kubectl get nats --all-namespaces diff --git a/.github/workflows/push-with-lifecycle-manager.yaml b/.github/workflows/push-with-lifecycle-manager.yaml index 1c45fc6e..6779bd0d 100644 --- a/.github/workflows/push-with-lifecycle-manager.yaml +++ b/.github/workflows/push-with-lifecycle-manager.yaml @@ -8,11 +8,11 @@ env: on: push: - branches: [ "main" ] + branches: ["main"] paths-ignore: - - 'docs/**' - - '**.md' - - 'sec-scanners-config.yaml' + - "docs/**" + - "**.md" + - "sec-scanners-config.yaml" jobs: e2e: @@ -21,6 +21,18 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: Cache Go dependencies + uses: actions/setup-go@v5 + with: + go-version-file: "./go.mod" + + - name: Cache Binaries + id: cache-binaries + uses: actions/cache@v3 + with: + path: bin + key: ${{ runner.os }}-bin + - name: Install k3d tools run: | make -C hack/ci/ install-k3d-tools diff --git a/.github/workflows/test.yml b/.github/workflows/unit-tests.yml similarity index 61% rename from .github/workflows/test.yml rename to .github/workflows/unit-tests.yml index 52e212d1..133dcb12 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/unit-tests.yml @@ -4,17 +4,17 @@ on: branches: - main paths-ignore: - - 'docs/**' - - '**.md' - - 'sec-scanners-config.yaml' + - "docs/**" + - "**.md" + - "sec-scanners-config.yaml" push: branches: - main paths-ignore: - - 'docs/**' - - '**.md' - - 'sec-scanners-config.yaml' + - "docs/**" + - "**.md" + - "sec-scanners-config.yaml" permissions: contents: read @@ -32,7 +32,14 @@ jobs: - name: Cache Go dependencies uses: actions/setup-go@v5 with: - go-version: '1.21' + go-version-file: "./go.mod" + + - name: Cache Binaries + id: cache-binaries + uses: actions/cache@v3 + with: + path: bin + key: ${{ runner.os }}-bin - name: Execute unit test run: make test