Merge pull request #10 from Ali-YousefiTelori/develop #7
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: dotnet format | |
on: | |
push: | |
branches: [develop] | |
jobs: | |
format: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: | | |
3.1.x | |
5.0.x | |
6.0.x | |
7.0.x | |
- name: Install Android | |
run: dotnet workload install android | |
- name: Run dotnet format | |
id: format | |
uses: jfversluis/[email protected] | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
action: "fix" | |
workspace: "./src/CSharp/EasyMicroservices.PaymentsMicroservice.sln" | |
- name: Test | |
run: | | |
dotnet test ./src/CSharp/EasyMicroservices.PaymentsMicroservice.sln -f netcoreapp3.1 | |
dotnet test ./src/CSharp/EasyMicroservices.PaymentsMicroservice.sln -f net6.0 | |
dotnet test ./src/CSharp/EasyMicroservices.PaymentsMicroservice.sln -f net5.0 | |
- name: Commit files | |
if: steps.format.outputs.has-changes == 'true' | |
uses: EndBug/[email protected] | |
with: | |
author_name: Github Actions | |
author_email: [email protected] | |
message: "chore: Automated dotnet-format update" | |
ref: ${{ github.head_ref }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |