updating the pipeline #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: Build and Test Docker Images | ||
| on: | ||
| push: | ||
| branches: [ main ] | ||
| pull_request: | ||
| branches: [ main ] | ||
| jobs: | ||
| build-and-test: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| - name: Set up .NET | ||
| uses: actions/setup-dotnet@v4 | ||
| with: | ||
| dotnet-version: '8.0.x' | ||
| - name: Restore dependencies | ||
| run: dotnet restore ModularMonolith.sln | ||
| - name: Build solution | ||
| run: dotnet build ModularMonolith.sln --no-restore --configuration Release | ||
| - name: Run tests | ||
| run: dotnet test ModularMonolith.sln --no-build --configuration Release --logger "trx;LogFileName=test_results.trx" | ||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
| - name: Build ECommerceApp Docker image | ||
| run: docker build -t ecommerceapp:latest ./ECommerceApp | ||
| if: ${{ exists('ECommerceApp/Dockerfile') }} | ||
|
Check failure on line 35 in .github/workflows/build-and-test.yml
|
||
| - name: Build ECommerce.AdminUI Docker image | ||
| run: docker build -t ecommerceadminui:latest ./ECommerce.AdminUI | ||
| if: ${{ exists('ECommerce.AdminUI/Dockerfile') }} | ||