-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add OSSF Scorecard and Go unit test workflows
- Loading branch information
1 parent
a167a3d
commit e8750f5
Showing
3 changed files
with
52 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: OSSF Scorecard | ||
|
||
on: | ||
schedule: | ||
- cron: "0 0 * * 0" # Executa semanalmente aos domingos | ||
workflow_dispatch: | ||
|
||
jobs: | ||
scorecard: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Run OSSF Scorecard | ||
uses: ossf/scorecard-action@v2 | ||
with: | ||
results_file: results.sarif | ||
# Opções adicionais podem ser configuradas aqui | ||
|
||
- name: Upload Scorecard Results | ||
uses: github/codeql-action/upload-sarif@v2 | ||
with: | ||
sarif_file: results.sarif |
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Go Unit Test | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
branches: [master] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Go 1.20 | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.20 | ||
|
||
- name: Install dependencies | ||
run: go mod download | ||
|
||
- name: Run unit tests | ||
run: make test-unit |
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