-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add reusable unit test action * set a default * add gosec * edits * add readme * Update README.md
- Loading branch information
1 parent
0a8c960
commit 9beeccb
Showing
2 changed files
with
60 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Copyright (c) 2024 Dell Inc., or its subsidiaries. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
# Reusable workflow to run unit tests and gosec on Golang based projects | ||
name: Common Workflows | ||
|
||
on: | ||
workflow_call: | ||
|
||
env: | ||
CODE_COVERAGE_TARGET: ${{ vars.CODE_COVERAGE_TARGET || 90 }} | ||
|
||
jobs: | ||
gocoverage: | ||
name: Unit tests and package coverage | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Run unit tests and check package coverage | ||
uses: dell/common-github-actions/go-code-tester@main | ||
with: | ||
threshold: ${{ env.CODE_COVERAGE_TARGET }} | ||
test-folder: ${{ vars.CODE_COVERAGE_DIR }} | ||
|
||
security: | ||
name: GoSec | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: gosec | ||
uses: dell/common-github-actions/gosec-runner@main |
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