Skip to content

Merge pull request #88 from osmanhadzic/docs/fix-sdk-docs #175

Merge pull request #88 from osmanhadzic/docs/fix-sdk-docs

Merge pull request #88 from osmanhadzic/docs/fix-sdk-docs #175

Workflow file for this run

#
# This file is part of Astarte.
#
# Copyright 2023 SECO Mind Srl
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#
name: End to End test
permissions:
contents: read
on:
push:
# Run on branch/tag creation
create:
# Run on pull requests
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
e2e-test:
runs-on: ubuntu-latest
steps:
- name: Create Astarte Cluster
id: astarte
uses: astarte-platform/astarte-cluster-action@v1
with:
astarte_version: "1.1.1"
- name: Checkout sources
uses: actions/checkout@v3
- name: Install interface
run: |
astartectl realm-management interfaces sync $GITHUB_WORKSPACE/AstarteDeviceSDKCSharpE2E.Tests/Resources/standard-interfaces/*.json --non-interactive
astartectl realm-management interfaces ls
- name: Register device
run: |
echo "E2E_REALM=test" >> $GITHUB_ENV
DEVICE_ID=$(astartectl utils device-id generate-random)
echo "E2E_DEVICE_ID=$DEVICE_ID" >> $GITHUB_ENV
CREDENTIALS_SECRET=$(astartectl pairing agent register --compact-output -- "$DEVICE_ID")
echo "E2E_CREDENTIALS_SECRET=$CREDENTIALS_SECRET" >> $GITHUB_ENV
echo "CSharp_LOG=debug" >> $GITHUB_ENV
TOKEN=$(astartectl utils gen-jwt appengine)
echo "E2E_TOKEN=$TOKEN" >> $GITHUB_ENV
echo "E2E_API_URL=https://api.autotest.astarte-platform.org" >> $GITHUB_ENV
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore AstarteDeviceSDKCSharp.sln
- name: Build
run: dotnet build AstarteDeviceSDKCSharp.sln --no-restore
- name: Run
run: dotnet test AstarteDeviceSDKCSharpE2E.Tests/AstarteDeviceSDKCSharpE2E.Tests.csproj