Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Tests #162

Merged
merged 88 commits into from
Nov 3, 2024
Merged
Show file tree
Hide file tree
Changes from 60 commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
3e544fe
Improve running local tests
attiasas Sep 1, 2024
d051b7b
Merge remote-tracking branch 'upstream/dev' into improve_tests
attiasas Sep 5, 2024
565829d
Merge remote-tracking branch 'upstream/dev' into improve_tests
attiasas Sep 5, 2024
d28ae76
fix merge
attiasas Sep 5, 2024
efa69cf
use actual test resource path
attiasas Sep 5, 2024
fdac9c1
Merge remote-tracking branch 'upstream/dev' into improve_tests
attiasas Sep 26, 2024
8717d0b
fix merge
attiasas Sep 26, 2024
11a9725
add more option
attiasas Sep 26, 2024
6f5fe8d
continue
attiasas Sep 26, 2024
030dc2a
continue
attiasas Sep 26, 2024
2d0540f
continue
attiasas Sep 27, 2024
9886c63
done remote test improve
attiasas Sep 27, 2024
a8a6170
Merge remote-tracking branch 'upstream/dev' into improve_tests
attiasas Sep 27, 2024
a89e5c2
update ci name var to max 8 char
attiasas Sep 27, 2024
13337b0
continue
attiasas Sep 29, 2024
9da2209
resolve merge conflicts
attiasas Sep 29, 2024
d064409
continue curation tests improv
attiasas Sep 30, 2024
958ffaa
continue
attiasas Oct 1, 2024
32f6ab3
add changes to action
attiasas Oct 1, 2024
49df5fb
fix test action
attiasas Oct 1, 2024
eb0e298
fix call to composite action
attiasas Oct 1, 2024
74040d9
try fix action call
attiasas Oct 1, 2024
be72599
update workflow
attiasas Oct 2, 2024
551462e
update add spell check
attiasas Oct 2, 2024
35991f2
fix
attiasas Oct 2, 2024
27afa6e
fix
attiasas Oct 2, 2024
b8c4cd2
fix
attiasas Oct 2, 2024
18c055b
ignore tests spell check
attiasas Oct 2, 2024
3ee2c9c
fix
attiasas Oct 2, 2024
4d8cf7d
try fix
attiasas Oct 2, 2024
2df4930
fix some
attiasas Oct 2, 2024
814b04b
try skip test data
attiasas Oct 2, 2024
7ea0b36
fix install action
attiasas Oct 2, 2024
35b8ad1
split audit and curation, add more info, clean
attiasas Oct 2, 2024
18727f1
Merge remote-tracking branch 'upstream/dev' into improve_tests
attiasas Oct 2, 2024
a827909
fix merge
attiasas Oct 2, 2024
487887d
fix typo
attiasas Oct 2, 2024
c5addff
update spell
attiasas Oct 2, 2024
681ff39
fix exclude
attiasas Oct 2, 2024
d34b9a0
try fix spell
attiasas Oct 2, 2024
23bfc89
fix spell
attiasas Oct 2, 2024
6e1ab8b
extend time
attiasas Oct 2, 2024
9daecb0
update names
attiasas Oct 2, 2024
c595a75
continue
attiasas Oct 7, 2024
19d0aad
fix tests
attiasas Oct 7, 2024
4e3d74c
cleanup and fix tests
attiasas Oct 7, 2024
6956651
fix static
attiasas Oct 7, 2024
d66836d
try fix windows tests
attiasas Oct 7, 2024
b2a597c
unit tests name change
attiasas Oct 7, 2024
2484254
update am to 1.9.7
attiasas Oct 10, 2024
0dc593f
fix curation test
attiasas Oct 10, 2024
bfab16e
try fix
attiasas Oct 10, 2024
9883fab
try fix
attiasas Oct 10, 2024
52d3367
try fix dotnet
attiasas Oct 10, 2024
a4d1505
Merge remote-tracking branch 'upstream/dev' into improve_tests
attiasas Oct 10, 2024
a4ad625
Merge remote-tracking branch 'upstream/dev' into improve_tests
attiasas Oct 13, 2024
517550c
CR changes
attiasas Oct 13, 2024
c7ae672
Merge remote-tracking branch 'upstream/dev' into improve_tests
attiasas Oct 14, 2024
82415af
fix conflicts
attiasas Oct 14, 2024
d86d9c3
fix typo
attiasas Oct 14, 2024
6cbbb0d
try fix tests
attiasas Oct 14, 2024
bae7cad
fix error handling
attiasas Oct 15, 2024
2c349c1
fix
attiasas Oct 15, 2024
b662cad
upgrade to go v1.23.2
attiasas Oct 15, 2024
337d06a
split more audit for more speed
attiasas Oct 15, 2024
715ba29
Merge remote-tracking branch 'upstream/dev' into improve_tests
attiasas Oct 28, 2024
eb1adbd
format
attiasas Oct 28, 2024
593677d
rename
attiasas Oct 28, 2024
a3c9754
fix spell
attiasas Oct 28, 2024
89fdf98
fix
attiasas Oct 28, 2024
8386601
try fix tests
attiasas Oct 29, 2024
f5c3599
try fix go
attiasas Oct 29, 2024
9ad2126
try fix
attiasas Oct 29, 2024
8aaed21
fix lic
attiasas Oct 29, 2024
1a0ee97
try fix nuget
attiasas Oct 29, 2024
47f229c
try fix nuget
attiasas Oct 29, 2024
b5ab2e7
restore test after debug try fix go
attiasas Oct 29, 2024
1e09471
try fix go
attiasas Oct 29, 2024
047b1ec
try fix go
attiasas Oct 29, 2024
bd8fd1a
fix docker secret validation
attiasas Oct 29, 2024
4e64709
add go tests
attiasas Oct 30, 2024
3b27de1
fix
attiasas Oct 30, 2024
b0ba74b
Fix tests
attiasas Nov 3, 2024
fbcbf6b
try fix
attiasas Nov 3, 2024
b1f61c6
Merge remote-tracking branch 'upstream/dev' into improve_tests
attiasas Nov 3, 2024
97b3ac1
try fix
attiasas Nov 3, 2024
cd90cc5
fix tests
attiasas Nov 3, 2024
c857f32
Merge remote-tracking branch 'upstream/dev' into improve_tests
attiasas Nov 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- [ ] The code has been formatted properly using `go fmt ./...`.
- [ ] All [static analysis checks](https://github.com/jfrog/jfrog-cli-security/actions/workflows/analysis.yml) passed.
- [ ] All [tests](https://github.com/jfrog/jfrog-cli-security/actions/workflows/test.yml) have passed. If this feature is not already covered by the tests, new tests have been added.
- [ ] Updated the [Contributing page](https://github.com/jfrog/jfrog-cli-security/blob/main/CONTRIBUTING.md) / [ReadMe page](https://github.com/jfrog/jfrog-cli-security/blob/main/README.md) / [CI Workflow files](https://github.com/jfrog/jfrog-cli-security/tree/main/.github/workflows) if needed.
- [ ] All changes are detailed at the description. if not already covered at [JFrog Documentation](https://github.com/jfrog/documentation), new documentation have been added.

-----
53 changes: 53 additions & 0 deletions .github/actions/install-and-setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: "Install and Setup Dependencies"
description: "Install needed dependencies for this repository like Go, Node, Java, Python, etc."

runs:
using: "composite"
steps:
# Install dependencies
- name: Setup Go with cache
uses: jfrog/.github/actions/install-go-with-cache@main

- name: Install npm
uses: actions/setup-node@v4
with:
node-version: "16"
- name: Setup Pnpm
uses: pnpm/action-setup@v3
with:
version: 8

- name: Install Java
uses: actions/setup-java@v4
with:
java-version: "11"
distribution: "adopt"
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-version: 7.6

- name: Install NuGet
uses: nuget/setup-nuget@v2
with:
nuget-version: 6.11.0
- name: Install dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.425

- name: Setup Python3
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Setup Pipenv
run: python -m pip install pipenv
shell: ${{ runner.os == 'Windows' && 'powershell' || 'bash' }}
- name: Setup Poetry
run: python -m pip install poetry
shell: ${{ runner.os == 'Windows' && 'powershell' || 'bash' }}
- name: Setup Conan
run: |
python -m pip install conan
conan profile detect
shell: ${{ runner.os == 'Windows' && 'powershell' || 'bash' }}
63 changes: 43 additions & 20 deletions .github/workflows/analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,61 @@ on:
tags-ignore:
- '**'
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.ref }}
cancel-in-progress: true
jobs:
Go-Lint:
name: Lint ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu, windows, macos ]
runs-on: ${{ matrix.os }}-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Setup Go with cache
uses: jfrog/.github/actions/install-go-with-cache@main

- name: Run Go vet
run: go vet -v ./...

Static-Check:
runs-on: ubuntu-latest
steps:
- name: Checkout Source
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.22.x
- name: Setup Go with cache
uses: jfrog/.github/actions/install-go-with-cache@main

- name: Static Code Analysis
uses: golangci/golangci-lint-action@v3
with:
args: |
--timeout 5m --out-${NO_FUTURE}format colored-line-number --enable errcheck,gosimple,govet,ineffassign,staticcheck,typecheck,unused,gocritic,asasalint,asciicheck,errchkjson,exportloopref,forcetypeassert,makezero,nilerr,unparam,unconvert,wastedassign,usestdlibvars
- name: Run Go vet
run: go vet -v ./...

- name: Run golangci linter
uses: jfrog/.github/actions/golangci-lint@main
attiasas marked this conversation as resolved.
Show resolved Hide resolved

Go-Sec:
runs-on: ubuntu-latest
steps:
- name: Checkout Source
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.22.x
- name: Setup Go with cache
uses: jfrog/.github/actions/install-go-with-cache@main

- name: Run Go-Sec scanner
uses: jfrog/.github/actions/gosec-scanner@main

# Temporarily set version 2.18.0 to workaround https://github.com/securego/gosec/issues/1046
- name: Run Gosec Security Scanner
uses: securego/[email protected]
with:
args: -exclude G204,G301,G302,G304,G306 -tests -exclude-dir \.*test\.* ./...
Check-Spelling:
name: Spell Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Check spelling
uses: crate-ci/typos@master
18 changes: 0 additions & 18 deletions .github/workflows/removeLabel.yml

This file was deleted.

Loading
Loading