Skip to content

Add cross-account bucket access via bucket policies example to docs (… #677

Add cross-account bucket access via bucket policies example to docs (…

Add cross-account bucket access via bucket policies example to docs (… #677

Workflow file for this run

name: Unit tests
on:
push:
branches: [ "main", "feature/*" ]
pull_request:
branches: [ "main", "feature/*" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
- name: Check style
run: make check_style
- name: Install Go Test Coverage
run: make install-go-test-coverage
- name: Build
run: make bin
- name: Test
# Run tests as root as we require it for systemd tests
run: sudo make test
- name: Check test coverage
run: make cover
- name: Upload report
uses: actions/upload-artifact@v4
id: uploaded-report
with:
name: cover
path: cover.html
- name: Comment test coverage
if: ${{ github.event_name == 'pull_request' }}
env:
TOTAL_COVERAGE: ${{ steps.go-test-coverage.outputs.total-coverage }}
ARTIFACT_URL: ${{ steps.uploaded-report.outputs.artifact-url }}
run: |
echo "### Total test coverage: ${{ env.TOTAL_COVERAGE }}%" >> $GITHUB_STEP_SUMMARY
echo "Download report: ${{ env.ARTIFACT_URL }}" >> $GITHUB_STEP_SUMMARY