From 272bccb0cb58b3ddf9864b9bdbbb05d13cd79d24 Mon Sep 17 00:00:00 2001 From: Anthony Dahanne Date: Fri, 20 Sep 2024 20:23:13 -0400 Subject: [PATCH] Apply latest pipeline-builder --- .github/workflows/pb-tests.yml | 49 ++++-------------------------- .github/workflows/pb-update-go.yml | 4 +-- 2 files changed, 8 insertions(+), 45 deletions(-) diff --git a/.github/workflows/pb-tests.yml b/.github/workflows/pb-tests.yml index 90f379a3..3ba39e10 100644 --- a/.github/workflows/pb-tests.yml +++ b/.github/workflows/pb-tests.yml @@ -169,55 +169,18 @@ jobs: PACKAGES: ttl.sh/test-${{ steps.version.outputs.version }} TTL_SH_PUBLISH: "true" VERSION: 1h + - name: Set up JDK + uses: actions/setup-java@v5 + with: + distribution: liberica + java-version: "17" - name: Run Integration Tests run: | #!/usr/bin/env bash set -euo pipefail - go test ./integration/... -run Integration + BP_UNDER_TEST=ttl.sh/${PACKAGE}-${VERSION}:1h make integration env: PACKAGE: test VERSION: ${{ steps.version.outputs.version }} - unit: - name: Unit Test - runs-on: - - ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/cache@v4 - with: - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - path: ${{ env.HOME }}/go/pkg/mod - restore-keys: ${{ runner.os }}-go- - - uses: actions/setup-go@v5 - with: - go-version: "1.23" - - name: Install richgo - run: | - #!/usr/bin/env bash - - set -euo pipefail - - echo "Installing richgo ${RICHGO_VERSION}" - - mkdir -p "${HOME}"/bin - echo "${HOME}/bin" >> "${GITHUB_PATH}" - - curl \ - --location \ - --show-error \ - --silent \ - "https://github.com/kyoh86/richgo/releases/download/v${RICHGO_VERSION}/richgo_${RICHGO_VERSION}_linux_amd64.tar.gz" \ - | tar -C "${HOME}"/bin -xz richgo - env: - RICHGO_VERSION: 0.3.10 - - name: Run Tests - run: | - #!/usr/bin/env bash - - set -euo pipefail - - richgo test ./... -run Unit - env: - RICHGO_FORCE_COLOR: "1" diff --git a/.github/workflows/pb-update-go.yml b/.github/workflows/pb-update-go.yml index 7efa48ff..59ad7cc1 100644 --- a/.github/workflows/pb-update-go.yml +++ b/.github/workflows/pb-update-go.yml @@ -1,7 +1,7 @@ name: Update Go "on": schedule: - - cron: 42 2 * * 1 + - cron: 27 2 * * 1 workflow_dispatch: {} jobs: update: @@ -25,7 +25,7 @@ jobs: exit 1 fi - OLD_GO_VERSION=$(grep -P '^go \d\.\d+' go.mod | cut -d ' ' -f 2) + OLD_GO_VERSION=$(grep -P '^go \d\.\d+' go.mod | cut -d ' ' -f 2 | cut -d '.' -f 1-2) go mod edit -go="$GO_VERSION" go mod tidy