Ignore relations without members. #212
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
name: .NET Core | |
on: | |
push: | |
branches: [ develop ] | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: 'true' | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Restore packages. | |
run: dotnet restore | |
- name: Build all projects. | |
run: dotnet build --configuration Release --no-restore | |
- name: Run dotnet format | |
run: dotnet format --verify-no-changes --verbosity diagnostic --no-restore | |
- name: Test with coverage report. | |
run: dotnet test --no-restore --collect:"XPlat Code Coverage" --settings coverlet.runsettings | |
working-directory: ./test/Itinero.Tests/ | |
- name: Nuget Pack | |
run: dotnet pack -c release | |
working-directory: ./src/Itinero/ | |
- name: Nuget Pack | |
run: dotnet pack -c release | |
working-directory: ./src/Itinero.IO.Osm/ | |
- name: Nuget Pack | |
run: dotnet pack -c release | |
working-directory: ./src/Itinero.Profiles.Lua/ | |
- name: Nuget Pack | |
run: dotnet pack -c release | |
working-directory: ./src/Itinero.Instructions/ | |
- name: Nuget Pack | |
run: dotnet pack -c release | |
working-directory: ./src/Itinero.Geo/ | |
- name: Nuget push | |
run: dotnet nuget push **/*.nupkg --skip-duplicate -k ${{ secrets.GITHUB_TOKEN }} -s https://nuget.pkg.github.com/itinero/index.json | |
working-directory: ./src/ | |
- name: Extract branch name | |
shell: bash | |
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" | |
id: extract_branch | |
- name: Copy test coverage report to branch named folder. | |
run: mkdir ./${{ steps.extract_branch.outputs.branch }}/ && rsync -avm --include='*.xml' -f 'hide,! */' ./test/Itinero.Tests/TestResults/ ./${{ steps.extract_branch.outputs.branch }}/ | |
- name: Generate test coverage report. | |
uses: danielpalme/[email protected] | |
with: | |
reports: '${{ steps.extract_branch.outputs.branch }}/**/*.xml' | |
targetdir: '${{ steps.extract_branch.outputs.branch }}-new' | |
reporttypes: 'Html;Badges' | |
assemblyfilters: '-protobuf-net' | |
verbosity: 'Info' | |
title: '' | |
tag: '${{ github.run_number }}_${{ github.run_id }}' | |
- name: Checkout test coverage results branch. | |
uses: actions/checkout@v2 | |
with: | |
ref: 'docs/coverage' | |
clean: 'false' | |
- name: Move results report to correct folder. | |
run: rsync -avm ./${{ steps.extract_branch.outputs.branch }}-new/ ./${{ steps.extract_branch.outputs.branch }}/ | |
- name: Cleanup | |
run: rm -r ${{ steps.extract_branch.outputs.branch }}-new/ | |
- name: Cleanup | |
run: rm -r src/Itinero.IO.Osm.Tiles/ontology | |
- name: Cleanup | |
run: rm -r test/Itinero.Tests/TestResults/ | |
- name: Commit test results. | |
run: git config --local user.email "[email protected]" && git config --local user.name "GitHub Action" && git stage -A && git commit -m "Added new coverage results for ${{ steps.extract_branch.outputs.branch }}" | |
- name: Push test results. | |
uses: ad-m/github-push-action@master | |
if: ${{ success() }} | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: 'docs/coverage' |