-
Notifications
You must be signed in to change notification settings - Fork 16
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
69aedf3
commit cb2693b
Showing
1 changed file
with
71 additions
and
71 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 |
---|---|---|
|
@@ -26,82 +26,82 @@ jobs: | |
arch: ${{ matrix.arch }} | ||
os: ${{ matrix.os }} | ||
channel: ${{ matrix.channel }} | ||
test-tags: 'up_to_nightly' | ||
test-tags: "up_to_nightly" | ||
|
||
Trivy: | ||
permissions: | ||
contents: read # for actions/checkout to fetch code | ||
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results | ||
strategy: | ||
matrix: | ||
include: | ||
# Latest branches | ||
- { branch: main, channel: latest/edge } | ||
# Stable branches | ||
# Add branches to test here | ||
# TODO: automatically retrieve the list of channels. | ||
- { branch: release-1.30, channel: 1.30-classic/edge } | ||
- { branch: release-1.31, channel: 1.31-classic/edge } | ||
- { branch: release-1.32, channel: 1.32-classic/edge } | ||
uses: ./.github/workflows/security-scan.yaml | ||
with: | ||
channel: ${{ matrix.channel }} | ||
checkout-ref: ${{ matrix.branch }} | ||
# Trivy: | ||
# permissions: | ||
# contents: read # for actions/checkout to fetch code | ||
# security-events: write # for github/codeql-action/upload-sarif to upload SARIF results | ||
# strategy: | ||
# matrix: | ||
# include: | ||
# # Latest branches | ||
# - { branch: main, channel: latest/edge } | ||
# # Stable branches | ||
# # Add branches to test here | ||
# # TODO: automatically retrieve the list of channels. | ||
# - { branch: release-1.30, channel: 1.30-classic/edge } | ||
# - { branch: release-1.31, channel: 1.31-classic/edge } | ||
# - { branch: release-1.32, channel: 1.32-classic/edge } | ||
# uses: ./.github/workflows/security-scan.yaml | ||
# with: | ||
# channel: ${{ matrix.channel }} | ||
# checkout-ref: ${{ matrix.branch }} | ||
|
||
TICS: | ||
permissions: | ||
contents: read | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
include: | ||
# Latest branches | ||
- { branch: main } | ||
steps: | ||
- name: Checking out repo | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{matrix.branch}} | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.12' | ||
- name: Install Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: './src/k8s/go.mod' | ||
- name: go mod download | ||
working-directory: src/k8s | ||
run: go mod download | ||
- name: TICS scan | ||
# TODO: move the following to a script. | ||
run: | | ||
export TICSAUTHTOKEN=${{ secrets.TICSAUTHTOKEN }} | ||
# TICS: | ||
# permissions: | ||
# contents: read | ||
# runs-on: ubuntu-latest | ||
# strategy: | ||
# matrix: | ||
# include: | ||
# # Latest branches | ||
# - { branch: main } | ||
# steps: | ||
# - name: Checking out repo | ||
# uses: actions/checkout@v4 | ||
# with: | ||
# ref: ${{matrix.branch}} | ||
# - uses: actions/setup-python@v5 | ||
# with: | ||
# python-version: '3.12' | ||
# - name: Install Go | ||
# uses: actions/setup-go@v5 | ||
# with: | ||
# go-version-file: './src/k8s/go.mod' | ||
# - name: go mod download | ||
# working-directory: src/k8s | ||
# run: go mod download | ||
# - name: TICS scan | ||
# # TODO: move the following to a script. | ||
# run: | | ||
# export TICSAUTHTOKEN=${{ secrets.TICSAUTHTOKEN }} | ||
|
||
set -x | ||
# Install python dependencies | ||
pip install -r tests/integration/requirements-test.txt | ||
pip install -r tests/integration/requirements-dev.txt | ||
# set -x | ||
# # Install python dependencies | ||
# pip install -r tests/integration/requirements-test.txt | ||
# pip install -r tests/integration/requirements-dev.txt | ||
|
||
cd src/k8s | ||
# cd src/k8s | ||
|
||
# TICS requires us to have the test results in cobertura xml format under the | ||
# directory use below | ||
sudo make go.unit | ||
go install github.com/boumenot/gocover-cobertura@latest | ||
gocover-cobertura < coverage.txt > coverage.xml | ||
mkdir .coverage | ||
mv ./coverage.xml ./.coverage/ | ||
# # TICS requires us to have the test results in cobertura xml format under the | ||
# # directory use below | ||
# sudo make go.unit | ||
# go install github.com/boumenot/gocover-cobertura@latest | ||
# gocover-cobertura < coverage.txt > 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/') | ||
# # 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 | ||
sudo add-apt-repository -y ppa:dqlite/dev | ||
sudo apt install dqlite-tools-v2 libdqlite1.17-dev | ||
sudo make clean | ||
go build -a ./... | ||
# # 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 | ||
# sudo add-apt-repository -y ppa:dqlite/dev | ||
# sudo apt install dqlite-tools-v2 libdqlite1.17-dev | ||
# sudo make clean | ||
# go build -a ./... | ||
|
||
TICSQServer -project k8s-snap -tmpdir /tmp/tics -branchdir $HOME/work/k8s-snap/k8s-snap/ | ||
# TICSQServer -project k8s-snap -tmpdir /tmp/tics -branchdir $HOME/work/k8s-snap/k8s-snap/ |