Skip to content

[dep][go](deps): Bump github.com/go-git/go-git/v5 from 5.16.5 to 5.17.1 #1277

[dep][go](deps): Bump github.com/go-git/go-git/v5 from 5.16.5 to 5.17.1

[dep][go](deps): Bump github.com/go-git/go-git/v5 from 5.16.5 to 5.17.1 #1277

name: "11 - Test: Acceptance"
on:
workflow_call:
push:
tags:
- v*
branches:
- main
workflow_dispatch:
pull_request:
permissions:
contents: read
env:
POWERPIPE_UPDATE_CHECK: false
SPIPETOOLS_TOKEN: ${{ secrets.SPIPETOOLS_TOKEN }}
jobs:
dashboard_tests:
name: Dashboard UI Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Setup Node.js
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: '20'
- name: Enable Corepack
run: corepack enable
- name: Install dependencies
run: |
cd ui/dashboard
yarn install
- name: Run tests
run: |
cd ui/dashboard
yarn test --watchAll=false
goreleaser:
name: Build
runs-on: ubuntu-24.04-arm
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
path: powerpipe
ref: ${{ github.event.ref }}
- name: Checkout Pipe Fittings Components repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
repository: turbot/pipe-fittings
path: pipe-fittings
ref: develop
- name: Run CLI Unit Tests
run: |
cd powerpipe
go clean -testcache
go test -timeout 30s ./... -test.v
- name: Set up Docker
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
- name: Install Docker (if needed)
run: |
if ! command -v docker &> /dev/null; then
sudo apt-get update
sudo apt-get install -y docker.io
fi
- name: Verify Docker installation
run: |
docker --version
# this is required, check golangci-lint-action docs
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with:
go-version: '1.26.1'
cache: false # setup-go v4 caches by default, do not change this parameter, check golangci-lint-action doc: https://github.com/golangci/golangci-lint-action/pull/704
- name: Build
run: |-
cd powerpipe
make release-dry-run
- name: Move build artifacts
run: |
ls -al $GITHUB_WORKSPACE/powerpipe
sudo chown -R runner:docker $GITHUB_WORKSPACE/powerpipe/dist
mkdir ~/artifacts
mv $GITHUB_WORKSPACE/powerpipe/dist/powerpipe.linux.amd64.tar.gz ~/artifacts/linux.tar.gz
mv $GITHUB_WORKSPACE/powerpipe/dist/powerpipe.darwin.amd64.tar.gz ~/artifacts/darwin.tar.gz
- name: List Build Artifacts
run: ls -l ~/artifacts
- name: Save Linux Build Artifact
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: build-artifact-linux
path: ~/artifacts/linux.tar.gz
if-no-files-found: error
- name: Save MacOS Build Artifact
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: build-artifact-darwin
path: ~/artifacts/darwin.tar.gz
if-no-files-found: error
acceptance_test:
name: Test
needs: goreleaser
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest]
test_block:
- "config_path"
- "check"
- "resource_show_outputs"
- "dashboard"
- "backend"
- "mod"
- "mod_install"
- "sp_files"
- "var_resolution"
- "params_and_args"
- "snapshot"
- "dashboard_parsing_validation"
- "database_precedence"
- "tag_filtering"
- "config_precedence"
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
submodules: true
path: powerpipe
ref: ${{ github.event.ref }}
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with:
go-version: 1.26.1
cache: false
- name: Prepare for downloads
id: prepare-for-downloads
run: |
mkdir ~/artifacts
- name: Download Linux Build Artifacts
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
if: ${{ matrix.platform == 'ubuntu-latest' }}
with:
name: build-artifact-linux
path: ~/artifacts
- name: Download Darwin Build Artifacts
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
if: ${{ matrix.platform == 'macos-latest' }}
with:
name: build-artifact-darwin
path: ~/artifacts
- name: Extract Darwin Artifacts and Install Binary
if: ${{ matrix.platform == 'macos-latest' }}
run: |
mkdir ~/build
tar -xf ~/artifacts/darwin.tar.gz -C ~/build
- name: Extract Ubuntu Artifacts and Install Binary
if: ${{ matrix.platform == 'ubuntu-latest' }}
run: |
mkdir ~/build
tar -xf ~/artifacts/linux.tar.gz -C ~/build
- name: Install Steampipe(Darwin)
if: ${{ matrix.platform == 'macos-latest' }}
run: |
brew install turbot/tap/steampipe
steampipe -v
- name: Install Steampipe(Linux)
if: ${{ matrix.platform == 'ubuntu-latest' }}
run: |
sudo /bin/sh -c "$(curl -fsSL https://steampipe.io/install/steampipe.sh)"
steampipe -v
- name: Set PATH
run: |
echo "PATH=$PATH:$HOME/build:$GTIHUB_WORKSPACE/powerpipe/tests/acceptance/lib/bats-core/libexec" >> $GITHUB_ENV
- name: Go install jd
run: |
go install github.com/josephburnett/jd@latest
- name: Start steamipipe service
run: |
steampipe service start
- name: Run Test Suite
id: run-test-suite
timeout-minutes: 15
continue-on-error: true
run: |
chmod +x $GITHUB_WORKSPACE/powerpipe/tests/acceptance/run.sh
$GITHUB_WORKSPACE/powerpipe/tests/acceptance/run.sh ${{ matrix.test_block }}.bats
echo "exit_code=$(echo $?)" >> $GITHUB_OUTPUT
echo ">> here"
# This job checks whether the test suite has passed or not.
# Since the exit_code is set only when the bats test suite pass,
# we have added the if-conditional block
- name: Check Test Passed/Failed
if: ${{ success() }}
continue-on-error: false
run: |
if [ ${{ steps.run-test-suite.outputs.exit_code }} -eq 0 ]; then
exit 0
else
exit 1
fi
- name: Stop steampipe service
run: |
steampipe service stop
cleanup:
# let's clean up the artifacts.
# incase this step isn't reached,
# artifacts automatically expire after 90 days anyway
# refer:
# https://docs.github.com/en/actions/configuring-and-managing-workflows/persisting-workflow-data-using-artifacts#downloading-and-deleting-artifacts-after-a-workflow-run-is-complete
name: Clean Up Artifacts
needs: acceptance_test
if: ${{ needs.acceptance_test.result == 'success' }}
runs-on: ubuntu-latest
steps:
- name: Clean up Linux Build
uses: geekyeggo/delete-artifact@f275313e70c08f6120db482d7a6b98377786765b # v5.1.0
with:
name: build-artifact-linux
failOnError: true
- name: Clean up Darwin Build
uses: geekyeggo/delete-artifact@f275313e70c08f6120db482d7a6b98377786765b # v5.1.0
with:
name: build-artifact-darwin
failOnError: true