CI #206
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: CI | |
on: | |
pull_request: | |
paths-ignore: | |
- '**.md' | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- '**.md' | |
workflow_dispatch: | |
jobs: | |
ci: | |
name: ${{ matrix.name }}-${{ matrix.api }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ windows-2022, ubuntu-22.04 ] | |
api: [ 'Sql', 'Table' ] | |
include: | |
- os: windows-2022 | |
name: Windows | |
- os: ubuntu-22.04 | |
name: Linux | |
fail-fast: false | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Azure login | |
uses: azure/[email protected] | |
with: | |
creds: ${{ secrets.AZURE_ACI_CREDENTIALS }} | |
- name: Run | |
uses: ./ | |
with: | |
connection-string-name: CosmosConnectionString | |
azure-credentials: ${{ secrets.AZURE_ACI_CREDENTIALS }} | |
tag: setup-cosmosdb-action | |
api: ${{ matrix.api }} | |
- name: Validate | |
shell: pwsh | |
run: | | |
echo "CosmosConnectionString = $($Env:CosmosConnectionString)" | |
if ( $Env:CosmosConnectionString -le 0 ) { | |
throw "Environment variable 'CosmosConnectionString' not set." | |
} | |
- name: Setup .NET SDK | |
uses: actions/[email protected] | |
with: | |
dotnet-version: 8.0.x | |
- name: Build | |
run: dotnet build src --configuration Release | |
- name: Run tests | |
uses: Particular/[email protected] |