Skip to content

ibmcloud: e2e test for flexible instance profiles #2490

ibmcloud: e2e test for flexible instance profiles

ibmcloud: e2e test for flexible instance profiles #2490

Workflow file for this run

# (C) Copyright Confidential Containers Contributors
# # SPDX-License-Identifier: Apache-2.0
#
# Build binary and run unit tests
---
name: build
on:
pull_request:
workflow_dispatch:
jobs:
build_job:
name: build
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
type:
- dev
- release
runner:
- ubuntu-latest
steps:
- name: Checkout the pull request code
uses: actions/checkout@v3
- name: Read properties from versions.yaml
run: |
go_version="$(yq '.tools.golang' versions.yaml)"
[ -n "$go_version" ]
echo "GO_VERSION=${go_version}" >> "$GITHUB_ENV"
- name: Setup Golang version ${{ env.GO_VERSION }}
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- name: Install build dependencies
if: matrix.type == 'dev'
run: |
sudo apt-get update -y
sudo apt-get install -y libvirt-dev
- name: Build
run: |
# Build the binaries
if [ ${{ matrix.type }} == "release" ]; then
RELEASE_BUILD=true make build
else
RELEASE_BUILD=false make build
fi
- name: Test
if: matrix.type == 'dev'
run: |
go install github.com/jstemmer/go-junit-report@v1.0.0
export CI="true"
sudo -E env PATH="$PATH" make test | tee tests_report.txt
sudo chmod o+rw tests_report.txt
cat tests_report.txt | $(go env GOPATH)/bin/go-junit-report -set-exit-code > tests_report_junit.xml
shell: bash
- name: Upload tests report
uses: actions/upload-artifact@v3
if: matrix.type == 'dev'
with:
name: tests_report_junit-${{ matrix.runner }}_${{ env.GO_VERSION }}
path: ${{ github.workspace }}/tests_report_junit.xml
retention-days: 1