From e4fece1315d817dd40626bd8617876e639585ace Mon Sep 17 00:00:00 2001 From: Moritz Wiesinger Date: Thu, 21 Nov 2024 13:55:30 +0100 Subject: [PATCH] rename files Signed-off-by: Moritz Wiesinger --- .github/workflows/base-package-tests.yaml | 30 ++++++++++ .github/workflows/nightly-package-tests.yml | 44 -------------- .github/workflows/package-tests.yaml | 64 +++++++++++++-------- 3 files changed, 69 insertions(+), 69 deletions(-) create mode 100644 .github/workflows/base-package-tests.yaml delete mode 100644 .github/workflows/nightly-package-tests.yml diff --git a/.github/workflows/base-package-tests.yaml b/.github/workflows/base-package-tests.yaml new file mode 100644 index 00000000..57d10102 --- /dev/null +++ b/.github/workflows/base-package-tests.yaml @@ -0,0 +1,30 @@ +name: Package Tests + +on: + workflow_call: + inputs: + type: + required: true + type: string + distribution: + required: true + type: string + +jobs: + package-tests: + name: Package Tests + runs-on: ubuntu-latest + strategy: + matrix: + type: ${{ fromJSON(inputs.type) }} + steps: + - name: Checkout + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + + - name: Download built artifacts + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: linux-packages + + - name: Test ${{ matrix.type }} package + run: ./scripts/package-tests/package-tests.sh ./otelcol*-SNAPSHOT-*_linux_amd64.${{ matrix.type }} ${{ inputs.distribution }} diff --git a/.github/workflows/nightly-package-tests.yml b/.github/workflows/nightly-package-tests.yml deleted file mode 100644 index 511204fe..00000000 --- a/.github/workflows/nightly-package-tests.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: Nightly Package Tests - Contrib - GoReleaser - -on: - push: - branches: [main] - paths: - - "distributions/otelcol-contrib/**" - - "cmd/**" - - ".github/**" - - "scripts/**" - - "Makefile" - - "go.mod" - - "go.sum" - pull_request: - branches: [main] - paths: - - "distributions/otelcol-contrib/**" - - "cmd/**" - - ".github/**" - - "scripts/**" - - "Makefile" - - "go.mod" - - "go.sum" -# schedule: -# - - -jobs: - check-goreleaser: - name: Continuous Integration - Contrib - GoReleaser - uses: ./.github/workflows/base-ci-goreleaser.yaml - with: - distribution: otelcol-contrib - goos: '[ "linux" ]' - goarch: '[ "amd64" ]' - latest: true - secrets: inherit - - package-tests: - name: Package tests - needs: check-goreleaser - uses: ./.github/workflows/package-tests.yaml - with: - distribution: otelcol-contrib - type: '[ "deb", "rpm" ]' diff --git a/.github/workflows/package-tests.yaml b/.github/workflows/package-tests.yaml index 57d10102..c9c9c40e 100644 --- a/.github/workflows/package-tests.yaml +++ b/.github/workflows/package-tests.yaml @@ -1,30 +1,44 @@ -name: Package Tests +name: Nightly Package Tests - Contrib - GoReleaser on: - workflow_call: - inputs: - type: - required: true - type: string - distribution: - required: true - type: string + push: + branches: [main] + paths: + - "distributions/otelcol-contrib/**" + - "cmd/**" + - ".github/**" + - "scripts/**" + - "Makefile" + - "go.mod" + - "go.sum" + pull_request: + branches: [main] + paths: + - "distributions/otelcol-contrib/**" + - "cmd/**" + - ".github/**" + - "scripts/**" + - "Makefile" + - "go.mod" + - "go.sum" + schedule: + - cron: "0 2 * * *" # every day at 2am UTC jobs: - package-tests: - name: Package Tests - runs-on: ubuntu-latest - strategy: - matrix: - type: ${{ fromJSON(inputs.type) }} - steps: - - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - - name: Download built artifacts - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 - with: - name: linux-packages + check-goreleaser: + name: Continuous Integration - Contrib - GoReleaser + uses: ./.github/workflows/base-ci-goreleaser.yaml + with: + distribution: otelcol-contrib + goos: '[ "linux" ]' + goarch: '[ "amd64" ]' + latest: true + secrets: inherit - - name: Test ${{ matrix.type }} package - run: ./scripts/package-tests/package-tests.sh ./otelcol*-SNAPSHOT-*_linux_amd64.${{ matrix.type }} ${{ inputs.distribution }} + package-tests: + name: Package tests + needs: check-goreleaser + uses: ./.github/workflows/package-tests.yaml + with: + distribution: otelcol-contrib + type: '[ "deb", "rpm" ]'