Skip to content

feat: added ci github action #2

feat: added ci github action

feat: added ci github action #2

Workflow file for this run

name: .NET 8 CI
on:
push:
pull_request:
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: bcgov/ag-devops/ci/dotnetcore/composite/dotnet-8-lint@v1.0.0
build:
name: Build
runs-on: ubuntu-latest
needs: lint
steps:
- uses: actions/checkout@v4
- uses: bcgov/ag-devops/ci/dotnetcore/composite/dotnet-8-dependencies@v1.0.0
with:
dotnet_build_path: "src/RfcBuddy.Web"
- uses: bcgov/ag-devops/ci/dotnetcore/composite/dotnet-8-build@v1.0.0
with:
dotnet_build_path: "src/RfcBuddy.Web"
warn_as_error: "true"
test:
name: Tests
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- uses: bcgov/ag-devops/ci/dotnetcore/composite/dotnet-8-tests-msbuild@v1.0.0
with:
unit_test_folder: "src/RfcBuddy.App.Tests"
coverage_threshold: "25"
coverage_threshold_type: "line,branch"
sast:
runs-on: ubuntu-latest
needs: [build, test]
steps:
- uses: actions/checkout@v4
- uses: bcgov/ag-devops/ci/security/sast@v1.0.0
with:
project-key: RfcBuddyTest
sonar-token: ${{ secrets.SONAR_TOKEN }}
sonar-host-url: ${{ vars.SONAR_HOST_URL }}
coverage-report: TestResults/coverage/coverage.cobertura.xml
gitleaks_license: ${{ secrets.GITLEAKS_LICENSE }}
github_token: ${{ secrets.GITHUB_TOKEN }}
package:
name: Package
runs-on: ubuntu-latest
needs: sast
steps:
- uses: actions/checkout@v4
- uses: bcgov/ag-devops/ci/.shared/docker-dind@v1.0.0
semantic_release:
runs-on: ubuntu-latest
needs: [package]
steps:
- uses: bcgov/ag-devops/ci/release/semantic-release@v1.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}