Merge branch 'main' into feat/test-url-resolution-and-add-br-region-t… #531
Workflow file for this run
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: 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 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
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 | |
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 | |
id: dotnet | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: | | |
6.0.x | |
7.0.x | |
8.0.x | |
- 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 | |
# --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 |