Skip to content

merge main into current #485

merge main into current

merge main into current #485

Workflow file for this run

name: build
on: [ push ]
env:
MOCK_AUTH_PORT: 6039
MOCK_SMS_PORT: 6041
MOCK_NUMBERS_PORT: 6040
MOCK_CONVERSATION_PORT: 6042
MOCK_VERIFICATION_PORT: 6043
MOCK_VOICE_PORT: 6044
MOCK_FAX_PORT: 6046
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
dotnet-version: [
{ version: '6.0.x', tfm: 'net6.0' },
{ version: '7.0.x', tfm: 'net7.0' },
{ version: '8.0.x', tfm: 'net8.0' },
]
services:
doppleganger:
image: dovchik/pastel:latest
credentials:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_HUB_DOVCHIK_PRIVATE }}
ports:
- 6039:6039
- 6040:6040
- 6041:6041
- 6042:6042
- 6043:6043
- 6044:6044
- 6046:6046
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0
with:
# NOTE!: https://github.com/GitTools/GitVersion/issues/3614 from tag branch gitversion appends suffix
# of tags-v*** which breaks publish right after tag branch build
versionSpec: '5.11.x'
- name: Determine Version
id: gitversion # id to later be referenced
uses: gittools/actions/gitversion/execute@v0
with:
useConfigFile: true
- name: Setup .NET SDK ${{ matrix.dotnet-version.version }}
id: dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet-version.version }}
- name: Checkout Wiremock fixtures repo
uses: actions/checkout@v3
with:
repository: sinch/sinch-sdk-internal-specs
token: ${{ secrets.GH_PAT_FINE }}
ref: numbers_fixtures
path: sinch-sdk-internal-specs
- name: Run WireMock with fixtures
run: |
cd sinch-sdk-internal-specs/fixtures/python/ && java -jar wiremock-studio-2.32.0-17.jar &
- name: Install dependencies
run: dotnet restore
- name: Check Formatting
run: dotnet format --verify-no-changes --verbosity diagnostic
- name: Build
run: dotnet build -p:Version=${{ steps.gitversion.outputs.semVer }} --configuration Release --no-restore
- name: Test
run: dotnet test --no-restore --verbosity normal --framework ${{ matrix.dotnet-version.tfm }}
# --include-symbols?
- name: Pack
run: dotnet pack --configuration Release src/Sinch -p:PackageVersion=${{ steps.gitversion.outputs.semVer }} -p:Version=${{ steps.gitversion.outputs.semVer }} --no-restore
- name: Archive nuget packages
uses: actions/upload-artifact@v3
with:
name: package
path: src/Sinch/bin/Release/*.nupkg
if-no-files-found: error