Skip to content

Merge pull request #48 from redhat-marketplace/fix/swc #142

Merge pull request #48 from redhat-marketplace/fix/swc

Merge pull request #48 from redhat-marketplace/fix/swc #142

Workflow file for this run

name: Go
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Check Licenses
run: make licenses-check
- name: Build
run: go build -v ./...
- name: WhiteSource Unified Agent Scan
env:
WS_APIKEY: ${{secrets.WS_APIKEY}}
WS_USERKEY: ${{secrets.WS_USERKEY}}
WS_WSS_URL: https://ibmets.whitesourcesoftware.com/agent
WS_PRODUCTNAME: PSIRT_PRD0011140
WS_PROJECTNAME: ${{github.event.repository.name}}
run: |
echo Downloading WhiteSource Unified Agent
curl -LJO https://unified-agent.s3.amazonaws.com/wss-unified-agent.jar
if [[ "$(curl -sL https://unified-agent.s3.amazonaws.com/wss-unified-agent.jar.sha256)" != "$(sha256sum wss-unified-agent.jar)" ]] ; then
echo "Integrity Check Failed"
else
echo "Integrity Check Passed"
echo Starting WhiteSource Scan
java -jar wss-unified-agent.jar
fi
- name: Ginkgo
run: |
go install github.com/onsi/ginkgo/v2/ginkgo
go install github.com/onsi/gomega/...
- name: Test
run: ginkgo -r --randomize-suites --randomize-all --fail-on-pending --cover --trace --race --show-node-events
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
if: github.ref != 'refs/heads/main'
with:
distribution: goreleaser
version: latest
args: release --snapshot --clean
- name: Archive build
if: github.ref != 'refs/heads/main'
uses: actions/upload-artifact@v3
with:
name: dist
path: dist/**/*.tar.gz