-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
actions: Adds TICS nightly job (#80)
Co-authored-by: Maciej Golaszewski <[email protected]>
- Loading branch information
Showing
2 changed files
with
65 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,58 @@ | ||
name: Security and quality nightly scan | ||
|
||
on: | ||
schedule: | ||
# At 00:00 every day | ||
- cron: '0 0 * * *' | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
TICS: | ||
permissions: | ||
contents: read | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Harden Runner | ||
uses: step-security/harden-runner@v2 | ||
with: | ||
egress-policy: audit | ||
|
||
- name: Checking out repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: "1.22" | ||
|
||
- name: go mod download | ||
run: | | ||
go mod download | ||
- name: TICS scan | ||
run: | | ||
export TICSAUTHTOKEN=${{ secrets.TICSAUTHTOKEN }} | ||
set -x | ||
# TICS requires us to have the test results in cobertura xml format under the | ||
# directory use below | ||
sudo make test-unit | ||
go install github.com/boumenot/gocover-cobertura@latest | ||
gocover-cobertura < cover_all.out > coverage.xml | ||
mkdir .coverage | ||
mv ./coverage.xml ./.coverage/ | ||
# Install the TICS and staticcheck | ||
go install honnef.co/go/tools/cmd/[email protected] | ||
. <(curl --silent --show-error 'https://canonical.tiobe.com/tiobeweb/TICS/api/public/v1/fapi/installtics/Script?cfg=default&platform=linux&url=https://canonical.tiobe.com/tiobeweb/TICS/') | ||
# We need to have our project built | ||
# We load the dqlite libs here instead of doing through make because TICS | ||
# will try to build parts of the project itself | ||
go build -a ./... | ||
TICSQServer -project ${{ github.event.repository.name }} -tmpdir /tmp/tics -branchdir $HOME/work/cluster-api-k8s/cluster-api-k8s/ |
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