-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
86 additions
and
86 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,86 +1,86 @@ | ||
name: .NET Core | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- dev | ||
- master | ||
pull_request: | ||
branches: | ||
- dev | ||
jobs: | ||
build: | ||
env: | ||
TESTS_PROJECT: 'CoreLispTests/CoreLispTests.csproj' | ||
PUBLISH_NUGET: true | ||
RUN_TESTS: true | ||
MAIN_CSPROJ: 'CoreLisp/CoreLisp.csproj' | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup .NET Core | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: 3.1.101 | ||
- name: Clean artifacts and nugets | ||
run: dotnet clean --configuration Release && dotnet nuget locals all --clear | ||
- name: Build with dotnet | ||
run: dotnet build --configuration Release | ||
- name: Test with dotnet | ||
uses: b3b00/coverlet-action@1.2.2 | ||
id: 'coverlet' | ||
if: env.RUN_TESTS | ||
with: | ||
testProject: ${{env.TESTS_PROJECT}} | ||
output: 'lcov.info' | ||
outputFormat: 'lcov' | ||
excludes: '[program]*' | ||
- name: coveralls | ||
uses: coverallsapp/github-action@v1.1.2 | ||
if: matrix.os == 'windows-latest' && env.RUN_TESTS | ||
with: | ||
github-token: ${{secrets.GITHUB_TOKEN }} | ||
path-to-lcov: ${{steps.coverlet.outputs.coverageFile}} | ||
- name: ReportGenerator | ||
uses: danielpalme/ReportGenerator-GitHub-Action@4.8.4 | ||
with: | ||
reports: ${{steps.coverlet.outputs.coverageFile}} | ||
targetdir: 'coveragereport' | ||
reporttypes: 'HtmlInline;lcov' | ||
verbosity: 'Info' # The verbosity level of the log messages. Values: Verbose, Info, Warning, Error, Off | ||
tag: '${{ github.run_number }}_${{ github.run_id }}' | ||
- name: publish nuget | ||
if: matrix.os == 'windows-latest' && env.PUBLISH_NUGET | ||
id: publish_nuget | ||
uses: brandedoutcast/publish-nuget@v2.5.2 | ||
with: | ||
VERSION_REGEX: <version>(.*)<\/version> | ||
PROJECT_FILE_PATH: ${{env.MAIN_CSPROJ}} | ||
NUGET_KEY: ${{secrets.NUGET_KEY}} | ||
VERSION_FILE_PATH: ${{env.MAIN_CSPROJ}} | ||
- name: Create Release | ||
if: ${{ success() && matrix.os == 'ubuntu-latest' && steps.publish_nuget.outputs.VERSION != '' && steps.publish_nuget.outputs.VERSION != null }} | ||
id: create_release | ||
uses: actions/create-release@latest | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ steps.publish_nuget.outputs.VERSION }} | ||
release_name: Release ${{ steps.publish_nuget.outputs.VERSION }} | ||
draft: false | ||
prerelease: false | ||
- name: Upload Release Asset | ||
if: ${{ success() && matrix.os == 'ubuntu-latest' && steps.create_release.outputs.upload_url != '' && steps.create_release.outputs.upload_url != null }} | ||
id: upload-release-asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ${{ steps.publish_nuget.outputs.PACKAGE_PATH }} | ||
asset_name: ${{ steps.publish_nuget.outputs.PACKAGE_NAME }} | ||
asset_content_type: application/zip | ||
name: .NET Core | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- dev | ||
- master | ||
pull_request: | ||
branches: | ||
- dev | ||
jobs: | ||
build: | ||
env: | ||
TESTS_PROJECT: 'CoreLispTests/CoreLispTests.csproj' | ||
PUBLISH_NUGET: true | ||
RUN_TESTS: true | ||
MAIN_CSPROJ: 'CoreLisp/CoreLisp.csproj' | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup .NET Core | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: 6.0.x | ||
- name: Clean artifacts and nugets | ||
run: dotnet clean --configuration Release && dotnet nuget locals all --clear | ||
- name: Build with dotnet | ||
run: dotnet build --configuration Release | ||
- name: Test with dotnet | ||
uses: b3b00/coverlet-action@1.2.2 | ||
id: 'coverlet' | ||
if: env.RUN_TESTS | ||
with: | ||
testProject: ${{env.TESTS_PROJECT}} | ||
output: 'lcov.info' | ||
outputFormat: 'lcov' | ||
excludes: '[program]*' | ||
- name: coveralls | ||
uses: coverallsapp/github-action@v1.1.2 | ||
if: matrix.os == 'windows-latest' && env.RUN_TESTS | ||
with: | ||
github-token: ${{secrets.GITHUB_TOKEN }} | ||
path-to-lcov: ${{steps.coverlet.outputs.coverageFile}} | ||
- name: ReportGenerator | ||
uses: danielpalme/ReportGenerator-GitHub-Action@4.8.4 | ||
with: | ||
reports: ${{steps.coverlet.outputs.coverageFile}} | ||
targetdir: 'coveragereport' | ||
reporttypes: 'HtmlInline;lcov' | ||
verbosity: 'Info' # The verbosity level of the log messages. Values: Verbose, Info, Warning, Error, Off | ||
tag: '${{ github.run_number }}_${{ github.run_id }}' | ||
- name: publish nuget | ||
if: matrix.os == 'windows-latest' && env.PUBLISH_NUGET | ||
id: publish_nuget | ||
uses: brandedoutcast/publish-nuget@v2.5.2 | ||
with: | ||
VERSION_REGEX: <version>(.*)<\/version> | ||
PROJECT_FILE_PATH: ${{env.MAIN_CSPROJ}} | ||
NUGET_KEY: ${{secrets.NUGET_KEY}} | ||
VERSION_FILE_PATH: ${{env.MAIN_CSPROJ}} | ||
- name: Create Release | ||
if: ${{ success() && matrix.os == 'ubuntu-latest' && steps.publish_nuget.outputs.VERSION != '' && steps.publish_nuget.outputs.VERSION != null }} | ||
id: create_release | ||
uses: actions/create-release@latest | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ steps.publish_nuget.outputs.VERSION }} | ||
release_name: Release ${{ steps.publish_nuget.outputs.VERSION }} | ||
draft: false | ||
prerelease: false | ||
- name: Upload Release Asset | ||
if: ${{ success() && matrix.os == 'ubuntu-latest' && steps.create_release.outputs.upload_url != '' && steps.create_release.outputs.upload_url != null }} | ||
id: upload-release-asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ${{ steps.publish_nuget.outputs.PACKAGE_PATH }} | ||
asset_name: ${{ steps.publish_nuget.outputs.PACKAGE_NAME }} | ||
asset_content_type: application/zip |