Add publish workflow for NuGet and GitHub Releases #1
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: Test | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '9.0.x' | |
| - name: Set up Docker Compose | |
| uses: docker/setup-compose-action@v1 | |
| - name: Start Docker Compose services | |
| working-directory: ./NullOpsDevs.LibSsh.Test | |
| run: docker compose up -d | |
| - name: Build test project (Release) | |
| run: dotnet build -c Release --self-contained -r linux-x64 ./NullOpsDevs.LibSsh.Test/NullOpsDevs.LibSsh.Test.csproj | |
| - name: Run tests | |
| working-directory: ./NullOpsDevs.LibSsh.Test/bin/Release/net9.0/linux-x64/ | |
| run: ./NullOpsDevs.LibSsh.Test | |
| - name: Cleanup Docker Compose | |
| if: always() | |
| working-directory: ./NullOpsDevs.LibSsh.Test | |
| run: docker compose down -v |