Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache GitHub Actions #565

Merged
merged 11 commits into from
Nov 3, 2023
Prev Previous commit
Next Next commit
Log dotnet restore
dalyIsaac committed Nov 2, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 8765eb9595214c8246fd3d1e4d070b440e17fe6b
60 changes: 30 additions & 30 deletions .github/workflows/commit.yml
Original file line number Diff line number Diff line change
@@ -39,45 +39,45 @@ jobs:

- name: Restore dependencies
run: |
dotnet restore Whim.sln -p:Configuration=$env:Configuration --packages=${{ github.workspace }}/.nuget/packages
dotnet restore Whim.sln -p:Configuration=$env:Configuration -v:d
env:
Configuration: ${{ matrix.configuration }}

- name: Install dotnet tools
run: |
dotnet tool restore
dotnet tool restore -v:d

- name: Check C# formatting
run: |
dotnet tool run dotnet-csharpier . --check
# - name: Check C# formatting
# run: |
# dotnet tool run dotnet-csharpier . --check

- name: Check XAML formatting
run: |
dotnet tool run xstyler --recursive --d . --passive --config ./.xamlstylerrc
# - name: Check XAML formatting
# run: |
# dotnet tool run xstyler --recursive --d . --passive --config ./.xamlstylerrc

# - name: Check analyzers
# run: |
# dotnet format analyzers Whim.sln --verify-no-changes --no-restore
# # - name: Check analyzers
# # run: |
# # dotnet format analyzers Whim.sln --verify-no-changes --no-restore

- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.1
# - name: Add msbuild to PATH
# uses: microsoft/setup-msbuild@v1.1

- name: Build
run: |
msbuild Whim.sln `
-p:Configuration=$env:Configuration `
-p:Platform=$env:Platform `
-p:BuildInParallel=true `
-maxCpuCount
env:
Configuration: ${{ matrix.configuration }}
Platform: ${{ matrix.platform }}
# - name: Build
# run: |
# msbuild Whim.sln `
# -p:Configuration=$env:Configuration `
# -p:Platform=$env:Platform `
# -p:BuildInParallel=true `
# -maxCpuCount
# env:
# Configuration: ${{ matrix.configuration }}
# Platform: ${{ matrix.platform }}

- name: Test
run: |
dotnet test Whim.sln --collect:"XPlat Code Coverage;Format=opencover"
# - name: Test
# run: |
# dotnet test Whim.sln --collect:"XPlat Code Coverage;Format=opencover"

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3.1.0
with:
files: src/**/TestResults/**/coverage.opencover.xml
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v3.1.0
# with:
# files: src/**/TestResults/**/coverage.opencover.xml