Update actions/checkout action to v6 (#77) #401
This file contains hidden or 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: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| ci: | |
| name: ${{ matrix.name }}-${{ matrix.cluster-type.label }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [windows-latest, ubuntu-latest] | |
| cluster-type: | |
| - label: 'Single' | |
| - label: 'Cluster' | |
| - label: 'Both' | |
| include: | |
| - os: windows-latest | |
| name: Windows | |
| - os: ubuntu-latest | |
| name: Linux | |
| fail-fast: false | |
| steps: | |
| - name: Checkout | |
| uses: actions/[email protected] | |
| - name: Azure login | |
| if: matrix.name == 'Windows' | |
| uses: azure/[email protected] | |
| with: | |
| creds: ${{ secrets.AZURE_ACI_CREDENTIALS }} | |
| - name: Run | |
| uses: ./ | |
| with: | |
| ravendb-license: ${{ secrets.RAVENDB_LICENSE }} | |
| ravendb-mode: ${{ matrix.cluster-type.label }} | |
| tag: setup-ravendb-action | |
| registry-username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| registry-password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Validate | |
| shell: pwsh | |
| run: | | |
| echo "RavenDBSingleNodeUrl = $($Env:RavenDBSingleNodeUrl)" | |
| $clusterType = '${{ matrix.cluster-type.label }}' | |
| echo "ClusterType = $clusterType" | |
| if ([string]::IsNullOrWhiteSpace($Env:RavenDBSingleNodeUrl) -and ($clusterType -in @('Single','Both'))) { | |
| throw "Environment variable 'RavenDBSingleNodeUrl' not set." | |
| } | |
| echo "CommaSeparatedRavenClusterUrls = $($Env:CommaSeparatedRavenClusterUrls)" | |
| if ([string]::IsNullOrWhiteSpace($Env:CommaSeparatedRavenClusterUrls) -and ($clusterType -in @('Cluster','Both'))) { | |
| throw "Environment variable 'CommaSeparatedRavenClusterUrls' 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] |