-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This reverts commit 1d8b6ac.
- Loading branch information
Showing
7 changed files
with
226 additions
and
69 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,29 @@ | ||
name: "Static Analysis" | ||
on: ["push", "pull_request"] | ||
jobs: | ||
Static-Check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Source | ||
uses: actions/checkout@v3 | ||
- name: Install Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.17.x | ||
- name: Static Code Analysis | ||
uses: dominikh/staticcheck-action@v1 | ||
|
||
Go-Sec: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Source | ||
uses: actions/checkout@v3 | ||
- name: Install Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.17.x | ||
- name: Install gosec | ||
run: curl -sfL https://raw.githubusercontent.com/securego/gosec/master/install.sh | sh -s -- -b $(go env GOPATH)/bin | ||
- name: Run gosec | ||
# Temporary ignoring G301,G302,G306 | ||
run: gosec -exclude=G204,G301,G302,G304,G306 -exclude-dir=\.*test\.* ./... |
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,35 @@ | ||
name: "CLA Assistant" | ||
on: | ||
# issue_comment triggers this action on each comment on issues and pull requests | ||
issue_comment: | ||
types: [created] | ||
pull_request_target: | ||
types: [opened,synchronize] | ||
|
||
jobs: | ||
CLAssistant: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions-ecosystem/action-regex-match@v2 | ||
id: sign-or-recheck | ||
with: | ||
text: ${{ github.event.comment.body }} | ||
regex: '\s*(I have read the CLA Document and I hereby sign the CLA)|(recheckcla)\s*' | ||
|
||
- name: "CLA Assistant" | ||
if: ${{ steps.sign-or-recheck.outputs.match != '' || github.event_name == 'pull_request_target' }} | ||
# Alpha Release | ||
uses: cla-assistant/[email protected] | ||
env: | ||
# Generated and maintained by github | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# JFrog organization secret | ||
PERSONAL_ACCESS_TOKEN : ${{ secrets.CLA_SIGN_TOKEN }} | ||
with: | ||
path-to-signatures: 'signed_clas.json' | ||
path-to-document: 'https://jfrog.com/cla/' | ||
remote-organization-name: 'jfrog' | ||
remote-repository-name: 'jfrog-signed-clas' | ||
# branch should not be protected | ||
branch: 'master' | ||
allowlist: bot* |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,158 @@ | ||
name: JFrog Client Go Tests | ||
on: | ||
push: | ||
# Triggers the workflow on labeled PRs only. | ||
pull_request_target: | ||
types: [labeled] | ||
# Ensures that only the latest commit is running for each PR at a time. | ||
# Ignores this rule for push events. | ||
concurrency: | ||
group: ${{ github.event.pull_request.number || github.sha }} | ||
cancel-in-progress: true | ||
jobs: | ||
Go-Lint: | ||
if: contains(github.event.pull_request.labels.*.name, 'safe to test') || github.event_name == 'push' | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
|
||
- name: Install Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.17.x | ||
|
||
- name: Go Cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: ${{ runner.os }}-go- | ||
|
||
- name: Lint | ||
run: go vet -v ./... | ||
|
||
JFrog-Client-Go-Artifactory-Tests: | ||
if: contains(github.event.pull_request.labels.*.name, 'safe to test') || github.event_name == 'push' | ||
name: ${{ matrix.suite }} ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
suite: [artifactory] | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Install Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.17.x | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
|
||
- name: Go Cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: ${{ runner.os }}-go- | ||
|
||
- name: Setup Artifactory | ||
run: | | ||
go install github.com/jfrog/jfrog-testing-infra/local-rt-setup@latest | ||
~/go/bin/local-rt-setup | ||
env: | ||
RTLIC: ${{secrets.RTLIC}} | ||
GOPROXY: direct | ||
|
||
- name: artifactory tests | ||
run: go test -v github.com/jfrog/jfrog-client-go/tests --timeout 0 --test.artifactory=true --rt.url='http://localhost:8081/artifactory/' --rt.user='admin' --rt.password='password' --ci.runId=${{ runner.os }}-${{ matrix.suite }} | ||
|
||
JFrog-Client-Go-Ds-Xr-Access-Tests: | ||
if: contains(github.event.pull_request.labels.*.name, 'safe to test') || github.event_name == 'push' | ||
name: ${{ matrix.suite }} ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
suite: [distribution, xray, access] | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
|
||
- name: Install Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.17.x | ||
|
||
- name: Go Cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: ${{ runner.os }}-go- | ||
|
||
- name: ${{ matrix.suite }} tests | ||
run: go test -v github.com/jfrog/jfrog-client-go/tests --timeout 0 --test.${{ matrix.suite }}=true --rt.url=${{ secrets.CLI_RT_URL }} --ds.url=${{ secrets.CLI_DIST_URL }} --xr.url=${{ secrets.CLI_XRAY_URL }} --access.url=${{ secrets.CLI_ACCESS_URL }} --rt.user=${{ secrets.CLI_RT_USER }} --rt.password=${{ secrets.CLI_RT_PASSWORD }} --access.token=${{ secrets.CLI_ACCESS_TOKEN }} --ci.runId=${{ runner.os }}-${{ matrix.suite }} | ||
|
||
JFrog-Client-Go-Pipelines-Tests: | ||
if: contains(github.event.pull_request.labels.*.name, 'safe to test') || github.event_name == 'push' | ||
name: pipelines ubuntu-latest | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.17.x | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
|
||
- name: pipelines tests | ||
run: go test -v github.com/jfrog/jfrog-client-go/tests --timeout 0 --test.pipelines=true --rt.url=${{ secrets.CLI_RT_URL }} --pipe.url=${{ secrets.CLI_PIPE_URL }} --rt.user=${{ secrets.CLI_RT_USER }} --rt.password=${{ secrets.CLI_RT_PASSWORD }} --pipe.accessToken=${{ secrets.CLI_PIPE_ACCESS_TOKE }} --pipe.vcsToken=${{ secrets.CLI_PIPE_VCS_TOKEN }} --pipe.vcsRepo=${{ secrets.CLI_PIPE_VCS_REPO }} --pipe.vcsBranch=${{ secrets.CLI_PIPE_VCS_BRANCH }} --ci.runId=${{ runner.os }}-pipe | ||
|
||
JFrog-Client-Go-Repositories-Tests: | ||
if: contains(github.event.pull_request.labels.*.name, 'safe to test') || github.event_name == 'push' | ||
name: repositories ubuntu-latest | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.17.x | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
|
||
- name: Go Cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: ${{ runner.os }}-go- | ||
|
||
- name: Setup Artifactory | ||
run: | | ||
go install github.com/jfrog/jfrog-testing-infra/local-rt-setup@latest | ||
~/go/bin/local-rt-setup | ||
env: | ||
RTLIC: ${{secrets.RTLIC}} | ||
GOPROXY: direct | ||
|
||
- name: Repositories tests | ||
run: go test -v github.com/jfrog/jfrog-client-go/tests --timeout 0 --test.repositories=true --rt.url='http://localhost:8081/artifactory/' --rt.user='admin' --rt.password='password' |
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
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