-
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
1 parent
070013e
commit 8f1468f
Showing
3 changed files
with
42 additions
and
7 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
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 |
---|---|---|
|
@@ -28,18 +28,18 @@ jobs: | |
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Check code formatting | ||
uses: zupit-it/pipeline-templates/.github/actions/dotnet/format@v1.7.0 | ||
with: | ||
WORKING_DIRECTORY: ${{ inputs.WORKING_DIRECTORY }} | ||
# - name: Check code formatting | ||
# uses: zupit-it/pipeline-templates/.github/actions/dotnet/format@v1.8.1 | ||
# with: | ||
# WORKING_DIRECTORY: ${{ inputs.WORKING_DIRECTORY }} | ||
|
||
- name: Build | ||
uses: zupit-it/pipeline-templates/.github/actions/dotnet/[email protected] | ||
with: | ||
WORKING_DIRECTORY: ${{ inputs.WORKING_DIRECTORY }} | ||
BUILD_CONFIG: "Debug" | ||
|
||
- name: Run linter | ||
- name: Lint | ||
uses: zupit-it/pipeline-templates/.github/actions/dotnet/lint@dotnet-linter | ||
with: | ||
WORKING_DIRECTORY: ${{ inputs.WORKING_DIRECTORY }} | ||
|
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 |
---|---|---|
|
@@ -361,6 +361,41 @@ steps: | |
SHELL: "bash" | ||
``` | ||
|
||
#### .NET Action - Lint | ||
|
||
This action: | ||
- run the `dotnet format` command on the `WORKING_DIRECTORY`. | ||
|
||
###### Requirements | ||
|
||
- The `WORKING_DIRECTORY` directory must contain a solution or a project file. | ||
- The correct .NET (6+) version must be installed. | ||
|
||
_This workflow doesn't download the codebase. You have to check out the repo by yourself._ | ||
|
||
###### Action | ||
|
||
**.github/actions/dotnet/lint** is the action that lints the code of a .NET solution. | ||
|
||
It requires these inputs: | ||
|
||
- **WORKING_DIRECTORY**: The directory where the runner can execute all the commands. It must contain a solution (`.sln`) or a project (`.csproj`) file. | ||
|
||
In addition, it is possible to specify this optional input: | ||
|
||
- **SHELL**: The shell type to use. By default, it is **bash**. | ||
|
||
This is an example to show how data should be formatted. | ||
|
||
```yaml | ||
steps: | ||
- name: Build | ||
uses: zupit-it/pipeline-templates/.github/actions/dotnet/[email protected] | ||
with: | ||
WORKING_DIRECTORY: "back-end" | ||
SHELL: "bash" | ||
``` | ||
|
||
#### .NET Action - Test | ||
|
||
This action: | ||
|