Skip to content

Commit

Permalink
Run tests on local Artifactory (#506)
Browse files Browse the repository at this point in the history
  • Loading branch information
RobiNino authored Jan 17, 2022
1 parent 9210476 commit 3c80960
Show file tree
Hide file tree
Showing 7 changed files with 564 additions and 242 deletions.
51 changes: 48 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,29 @@ concurrency:
group: ${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
JFrog-Client-Go-Tests:
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: [artifactory, distribution, xray, access]
suite: [distribution, xray, access]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.17.x

- name: Lint
run: go vet -v ./...

- 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:
Expand All @@ -49,10 +52,12 @@ jobs:
uses: actions/setup-go@v2
with:
go-version: 1.17.x

- name: Checkout code
uses: actions/checkout@v2
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-Repository-Tests:
Expand All @@ -64,9 +69,49 @@ jobs:
uses: actions/setup-go@v2
with:
go-version: 1.17.x

- name: Checkout code
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}

- 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: repository tests
run: go test -v github.com/jfrog/jfrog-client-go/tests --timeout 0 --test.repository=true --rt.url=${{ secrets.CLI_RT_URL }} --rt.user=${{ secrets.CLI_RT_USER }} --rt.password=${{ secrets.CLI_RT_PASSWORD }} --access.token=${{ secrets.CLI_ACCESS_TOKEN }}
run: go test -v github.com/jfrog/jfrog-client-go/tests --timeout 0 --test.repository=true --rt.url='http://localhost:8081/artifactory/' --rt.user='admin' --rt.password='password'
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@v2
with:
go-version: 1.17.x

- name: Checkout code
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}

- 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 }}
Loading

0 comments on commit 3c80960

Please sign in to comment.