From 2b9700f1ee7d6c9e844adf4cf610eb7f62776d8c Mon Sep 17 00:00:00 2001 From: Alex Goodman Date: Fri, 14 Nov 2025 16:14:32 -0500 Subject: [PATCH] attempt to bring down ci times Signed-off-by: Alex Goodman --- .github/workflows/validations.yaml | 8 ++++---- Taskfile.yaml | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/validations.yaml b/.github/workflows/validations.yaml index 7cf3eb5eb..ec9efda81 100644 --- a/.github/workflows/validations.yaml +++ b/.github/workflows/validations.yaml @@ -32,7 +32,7 @@ jobs: name: "Unit tests" # we need more storage than what's on the default runner # Runner definition: workflows/.github/runs-on.yml - runs-on: runs-on=${{ github.run_id }}/runner=small + runs-on: runs-on=${{ github.run_id }}/runner=medium steps: - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0 with: @@ -50,7 +50,7 @@ jobs: # Note: changing this job name requires making the same update in the .github/workflows/release.yaml pipeline name: "Integration tests" # Runner definition: workflows/.github/runs-on.yml - runs-on: runs-on=${{ github.run_id }}/runner=small + runs-on: runs-on=${{ github.run_id }}/runner=medium steps: - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0 with: @@ -102,7 +102,7 @@ jobs: name: "Acceptance tests (Linux)" needs: [Build-Snapshot-Artifacts] # Runner definition: workflows/.github/runs-on.yml - runs-on: runs-on=${{ github.run_id }}/runner=small + runs-on: runs-on=${{ github.run_id }}/runner=medium steps: # required for magic-cache from runs-on to function with artifact upload/download (see https://runs-on.com/caching/magic-cache/#actionsupload-artifact-compatibility) - uses: runs-on/action@v2 @@ -180,7 +180,7 @@ jobs: name: "CLI tests (Linux)" needs: [Build-Snapshot-Artifacts] # Runner definition: workflows/.github/runs-on.yml - runs-on: runs-on=${{ github.run_id }}/runner=small + runs-on: runs-on=${{ github.run_id }}/runner=medium steps: # required for magic-cache from runs-on to function with artifact upload/download (see https://runs-on.com/caching/magic-cache/#actionsupload-artifact-compatibility) - uses: runs-on/action@v2 diff --git a/Taskfile.yaml b/Taskfile.yaml index 3fb15daaa..8c24d55f7 100644 --- a/Taskfile.yaml +++ b/Taskfile.yaml @@ -39,9 +39,9 @@ vars: # e.g. when installing snapshot debs from a local path, ./ forces the deb to be installed in the current working directory instead of referencing a package name SNAPSHOT_DIR: ./snapshot SNAPSHOT_BIN: "{{ .PROJECT_ROOT }}/{{ .SNAPSHOT_DIR }}/{{ .OS }}-build_{{ .OS }}_{{ .ARCH }}/{{ .PROJECT }}" - SNAPSHOT_CMD: "{{ .TOOL_DIR }}/goreleaser release --config {{ .TMP_DIR }}/goreleaser.yaml --clean --snapshot --skip=publish --skip=sign" - BUILD_CMD: "{{ .TOOL_DIR }}/goreleaser build --config {{ .TMP_DIR }}/goreleaser.yaml --clean --snapshot --single-target" - RELEASE_CMD: "{{ .TOOL_DIR }}/goreleaser release --clean --release-notes {{ .CHANGELOG }}" + SNAPSHOT_CMD: "{{ .TOOL_DIR }}/goreleaser release --config {{ .TMP_DIR }}/goreleaser.yaml --clean --snapshot --skip=publish --skip=sign --parallelism=12" + BUILD_CMD: "{{ .TOOL_DIR }}/goreleaser build --config {{ .TMP_DIR }}/goreleaser.yaml --clean --snapshot --single-target --parallelism=12" + RELEASE_CMD: "{{ .TOOL_DIR }}/goreleaser release --clean --release-notes {{ .CHANGELOG }} --parallelism=12" VERSION: sh: git describe --dirty --always --tags @@ -218,14 +218,14 @@ tasks: # unit test coverage threshold (in % coverage) COVERAGE_THRESHOLD: 62 cmds: - - "go test -coverprofile {{ .TMP_DIR }}/unit-coverage-details.txt {{ .TEST_PKGS }}" + - "go test -p=4 -parallel=8 -coverprofile {{ .TMP_DIR }}/unit-coverage-details.txt {{ .TEST_PKGS }}" - cmd: ".github/scripts/coverage.py {{ .COVERAGE_THRESHOLD }} {{ .TMP_DIR }}/unit-coverage-details.txt" silent: true integration: desc: Run integration tests cmds: - - "go test -v ./cmd/syft/internal/test/integration" + - "go test -v -p=4 -parallel=8 ./cmd/syft/internal/test/integration" # exercise most of the CLI with the data race detector # we use a larger image to ensure we're using multiple catalogers at a time - "go run -race cmd/syft/main.go anchore/test_images:grype-quality-dotnet-69f15d2"