Skip to content

Migrate to Github actions for CI pipeline #4

Migrate to Github actions for CI pipeline

Migrate to Github actions for CI pipeline #4

# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: CI - Windows - Java 11
on:
workflow_dispatch:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn install -DskipUnitTests # Unit tests fail at runtime for Java 11+ due to an old mocking framework we used in these tests
env:
IOT_DPS_CONNECTION_STRING: ${{ secrets.IOT_DPS_CONNECTION_STRING }}
IOT_DPS_ID_SCOPE: ${{ secrets.IOT_DPS_ID_SCOPE }}
IOTHUB_CONNECTION_STRING: ${{ secrets.IOTHUB_CONNECTION_STRING }}
DPS_GLOBALDEVICEENDPOINT_INVALIDCERT: ${{ secrets.DPS_GLOBALDEVICEENDPOINT_INVALIDCERT }}
PROVISIONING_CONNECTION_STRING_INVALIDCERT: ${{ secrets.PROVISIONING_CONNECTION_STRING_INVALIDCERT }}
IS_BASIC_TIER_HUB: true
TARGET_BRANCH: $(System.PullRequest.TargetBranch)
RECYCLE_TEST_IDENTITIES: true