Added quotes for openTelemetryEndpoint in slate-conf.yml. (#481) #366
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Unit Tests | |
concurrency: | |
group: unittests-${{ github.repository }} | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
inputs: | |
branch: | |
description: 'Branch under test:' | |
required: false | |
default: master | |
type: string | |
kubernetes-version: | |
description: 'Version of Kubernetes to use (e.g. 1.24.9):' | |
required: false | |
default: '1.24.9' | |
type: string | |
env: | |
AWS_CPP_SDK_VERSION: "1.9.365" | |
CCACHE_NAME: "cpp-unittest-build" | |
DEBIAN_FRONTEND: "noninteractive" | |
HELM_VERSION: "3.8.1" | |
MINIKUBE_VERSION: "1.30.1" | |
OPENTELEMETRY_VERSION: "1.6.1" | |
PYTHON_VERSION: "3.10.7" | |
jobs: | |
workflow-inputs: | |
name: Display Workflow Inputs | |
runs-on: ubuntu-20.04 | |
if: github.event.inputs != '' | |
steps: | |
- name: Output inputs | |
run: |- | |
echo "## Workflow inputs" >> $GITHUB_STEP_SUMMARY | |
echo '```' >> $GITHUB_STEP_SUMMARY | |
echo "${{ toJSON(github.event.inputs) }}" >> $GITHUB_STEP_SUMMARY | |
echo '```' >> $GITHUB_STEP_SUMMARY | |
test: | |
name: Test | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Install OS Packages | |
run: |- | |
sudo apt-get update -y | |
sudo apt-get install -y \ | |
autoconf \ | |
build-essential \ | |
ccache \ | |
cmake \ | |
g++ \ | |
libbenchmark-dev \ | |
libboost-all-dev \ | |
libcrypto++-dev \ | |
libcurl4-openssl-dev \ | |
libgmock-dev \ | |
libgrpc-dev \ | |
libgrpc++-dev \ | |
libgtest-dev \ | |
libprotobuf-dev \ | |
libtool \ | |
libssl-dev \ | |
libyaml-cpp-dev \ | |
libz-dev \ | |
pkg-config \ | |
protobuf-compiler-grpc | |
- name: Install AWS C++ SDK | |
working-directory: . | |
run: |- | |
curl -fsSL https://raw.githubusercontent.com/slateci/docker-images/master/slate-client-server/scripts/install-aws-cpp-sdk.sh -o install-aws-cpp-sdk.sh | |
chmod +x ./install-aws-cpp-sdk.sh | |
sudo ./install-aws-cpp-sdk.sh ${{ env.AWS_CPP_SDK_VERSION }} ubuntu22_04 | |
- name: Install OpenTelemetry C++ Client | |
working-directory: . | |
run: |- | |
curl -fsSL https://raw.githubusercontent.com/slateci/docker-images/master/slate-client-server/scripts/install-opentelemetry.sh -o install-opentelemetry.sh | |
chmod +x ./install-opentelemetry.sh | |
sudo ./install-opentelemetry.sh ${{ env.OPENTELEMETRY_VERSION }} ubuntu22_04 | |
- name: Check out repo | |
if: ${{ github.event.inputs.branch == '' }} | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
path: ./checkout | |
- name: Check out specific branch of repo | |
if: ${{ github.event.inputs.branch != '' }} | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
path: ./checkout | |
ref: ${{ github.event.inputs.branch }} | |
- name: Set up ccache | |
uses: hendrikmuhs/[email protected] | |
with: | |
key: ${{ runner.os }}-${{ env.CCACHE_NAME }}-${{ github.ref }} | |
restore-keys: | | |
${{ runner.os }}-${{ env.CCACHE_NAME }}-${{ github.ref }} | |
${{ runner.os }}-${{ env.CCACHE_NAME }}- | |
- name: Build SLATE binaries and tests | |
working-directory: ./checkout/build | |
env: | |
VERSION_OVERRIDE: localdev | |
run: |- | |
cmake .. \ | |
-D CMAKE_C_COMPILER_LAUNCHER=ccache \ | |
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache \ | |
-DBUILD_CLIENT=True \ | |
-DBUILD_SERVER=True \ | |
-DBUILD_SERVER_TESTS=True \ | |
-DSTATIC_CLIENT=False | |
make -j2 -k | |
- name: Create Minikube Cluster | |
if: ${{ github.event.inputs.kubernetes-version == '' }} | |
uses: medyagh/setup-minikube@master | |
with: | |
minikube-version: ${{ env.MINIKUBE_VERSION }} | |
driver: docker | |
container-runtime: containerd | |
kubernetes-version: "v1.24.9" | |
cni: calico | |
- name: Create Minikube Cluster | |
if: ${{ github.event.inputs.kubernetes-version != '' }} | |
uses: medyagh/setup-minikube@master | |
with: | |
minikube-version: ${{ env.MINIKUBE_VERSION }} | |
driver: docker | |
container-runtime: containerd | |
kubernetes-version: "v${{ github.event.inputs.kubernetes-version }}" | |
cni: calico | |
- name: Install local DynamoDB | |
working-directory: . | |
run: |- | |
mkdir ./dynamodb | |
curl -fsSL https://raw.githubusercontent.com/slateci/docker-images/master/slate-client-server/scripts/install-dynamo.sh -o install-dynamo.sh | |
chmod +x ./install-dynamo.sh | |
sudo ./install-dynamo.sh ${{ github.workspace }}/dynamodb | |
ls -al ./dynamodb | |
- name: Install Helm | |
uses: azure/setup-helm@v3 | |
with: | |
version: ${{ env.HELM_VERSION }} | |
- name: Run tests | |
timeout-minutes: 180 | |
working-directory: ./checkout/build | |
env: | |
DYNAMODB_JAR: "${{ github.workspace }}/dynamodb/DynamoDBLocal.jar" | |
DYNAMODB_LIB: "${{ github.workspace }}/dynamodb/DynamoDBLocal_lib" | |
SLATE_SCHEMA_DIR: "${{ github.workspace }}/checkout/resources/api_specification" | |
TEST_SRC: "${{ github.workspace }}/checkout/test" | |
run: make check | |
notifications: | |
name: Notifications | |
runs-on: ubuntu-20.04 | |
needs: | |
- test | |
if: ${{ always() && (needs.test.result == 'failure') }} | |
steps: | |
- name: Notify Slack of Failure | |
uses: slateci/github-actions/.github/actions/slack-notify-failure@v16 | |
with: | |
slack_bot_token: '${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }}' |