Skip to content

spell correction

spell correction #77

Workflow file for this run

# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: .NET
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:latest
env:
POSTGRES_DB: your-lab-dev-db
POSTGRES_USER: your-lab-dev
POSTGRES_PASSWORD: SuperSecurePassw0rd
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal --collect:"XPlat Code Coverage"
- name: Find coverage reports
id: find-reports
run: |
echo "::set-output name=paths::$(find ${{ github.workspace }} -name "coverage.cobertura.xml")"
- name: Send coverage-reports to Codacy
uses: codacy/[email protected]
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: ${{ steps.find-reports.outputs.paths }}
- name: Configure PostgreSQL Credentials
run: |
echo "YOUR_LAB__DB__HOST=localhost" >> $GITHUB_ENV
echo "YOUR_LAB__DB__PORT=5432" >> $GITHUB_ENV
echo "YOUR_LAB__DB__DATABASE=your-lab-dev-db" >> $GITHUB_ENV
echo "YOUR_LAB__DB__USER=your-lab-dev" >> $GITHUB_ENV
echo "YOUR_LAB__DB__PASSWORD=SuperSecurePassw0rd" >> $GITHUB_ENV
- name: Run application
run: dotnet run --project /home/runner/work/Your-Lab/Your-Lab/API/API.csproj &
- name: Wait for application startup
run: sleep 10
- name: ZAP Scan
uses: zaproxy/[email protected]
with:
#token: ${{ secrets.GITHUB_TOKEN }}
docker_name: 'ghcr.io/zaproxy/zaproxy:stable'
target: 'http://localhost:5209'
cmd_options: '-a' # Aggressive scanning enabled
- name: Stop application
run: pkill dotnet