Skip to content

Commit

Permalink
update ci
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasteles committed Apr 4, 2024
1 parent 115bf8a commit 09d5513
Showing 1 changed file with 67 additions and 70 deletions.
137 changes: 67 additions & 70 deletions .github/workflows/ci.yml
Expand Up @@ -3,7 +3,7 @@ name: CI
on:
workflow_dispatch:
push:
branches: ["master"]
branches: [ "master" ]

env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
Expand All @@ -18,72 +18,69 @@ jobs:
cancel-in-progress: true

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup .NET Core
uses: actions/setup-dotnet@v2
with:
global-json-file: global.json

- name: Tool Restore
run: dotnet tool restore

- name: Build
run: dotnet nuke build

- name: Lint
run: dotnet nuke lint

- name: Tests
run: dotnet nuke test --configuration Release --skip build --no-logo

- name: Test Result
if: ${{ github.actor != 'dependabot[bot]' && (success() || failure()) }}
uses: dorny/test-reporter@v1.5.0
with:
name: Test Report
reporter: dotnet-trx
path: tests/**/test_result.xml

- name: Generate Coverage Html Report
if: ${{ github.actor != 'dependabot[bot]' }}
run: dotnet nuke generate-report --no-logo

- name: Create CheckRun for code Coverage
uses: LouisBrunner/checks-action@v1.2.0
if: ${{ github.actor != 'dependabot[bot]' }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: Coverage Report Summary
conclusion: ${{ job.status }}
output_text_description_file: TestReport/Summary.md
output: '{"summary":"Created by Report-Generator"}'

- name: Upload Report
uses: actions/upload-artifact@v3
if: ${{ github.actor != 'dependabot[bot]' }}
with:
name: test_report
path: ./TestReport

- name: Generate Coverage Badges
run: dotnet nuke generate-badges --no-logo

- name: Lines of Code Badge
uses: DeathSy/GHA-LoC-Badge@1.0.3
with:
directory: ./
badge: ./Badges/lines_badge.svg
patterns: "**/*.fs|**/*.fsx|**/*.cs|**/*.ts|**/*.js"
ignore: "node_modules"

- name: Publish Badges
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./Badges
publish_branch: badges
force_orphan: true
- name: Checkout Branch
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
global-json-file: global.json

- name: Tool Restore
run: dotnet tool restore

- name: Build
run: dotnet nuke build

- name: Lint
run: dotnet nuke lint

- name: Tests
run: dotnet nuke test --configuration Release --skip build --no-logo

- name: Test Result
if: ${{ github.actor != 'dependabot[bot]' && (success() || failure()) }}
uses: dorny/test-reporter@v1.5.0
with:
name: Test Report
reporter: dotnet-trx
path: tests/**/test_result.xml

- name: Generate Coverage Html Report
if: ${{ github.actor != 'dependabot[bot]' }}
run: dotnet nuke generate-report --no-logo

- name: Create CheckRun for code Coverage
uses: LouisBrunner/checks-action@v1.2.0
if: ${{ github.actor != 'dependabot[bot]' }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: Coverage Report Summary
conclusion: ${{ job.status }}
output_text_description_file: TestReport/Summary.md
output: '{"summary":"Created by Report-Generator"}'

- name: Build Docs
run: dotnet nuke build-docs

- name: Generate Coverage Badges
run: dotnet nuke generate-badges --no-logo

- name: Lines of Code Badge
uses: DeathSy/GHA-LoC-Badge@1.0.3
with:
directory: ./
badge: ./docfx/_site/lines_badge.svg
patterns: "**/*.fs|**/*.fsx|**/*.cs|**/*.ts|**/*.js"
ignore: "node_modules"

- name: Publish Badges
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docfx/_site
publish_branch: site
force_orphan: true

0 comments on commit 09d5513

Please sign in to comment.