From db83d9048a76803036d99e39a856acd1559f1f3a Mon Sep 17 00:00:00 2001 From: Nikita Pivkin Date: Tue, 15 Aug 2023 12:11:20 +0700 Subject: [PATCH] run integration tests only on ubuntu --- .github/workflows/test-trivy.yaml | 34 +++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/.github/workflows/test-trivy.yaml b/.github/workflows/test-trivy.yaml index d6b82e60d..bb5c18a14 100644 --- a/.github/workflows/test-trivy.yaml +++ b/.github/workflows/test-trivy.yaml @@ -51,6 +51,40 @@ jobs: - name: Run unit tests run: mage test:unit + integration: + name: Integration Tests + runs-on: ubuntu-latest + defaults: + run: + working-directory: ${{ env.TRIVY_DIR }} + steps: + - name: Checkout defsec + uses: actions/checkout@v3 + with: + repository: aquasecurity/defsec + path: ${{ env.DEFSEC_DIR }} + + - name: Checkout trivy + uses: actions/checkout@v3 + with: + repository: aquasecurity/trivy + path: ${{ env.TRIVY_DIR }} + + - uses: actions/setup-go@v4 + with: + go-version-file: "${{ env.TRIVY_DIR }}/go.mod" + cache-dependency-path: "${{ env.TRIVY_DIR }}/go.sum" + + - name: Replace defsec + run: | + go mod edit -replace "github.com/aquasecurity/defsec=../${{ env.DEFSEC_DIR }}" + + - name: Install tools + uses: aquaproj/aqua-installer@v2.1.2 + with: + aqua_version: v2.8.0 + working_directory: ${{ env.TRIVY_DIR }} + - name: Run integration tests run: mage test:integration