|
1 | 1 | name: Artifactory Tests |
2 | 2 | on: |
| 3 | + workflow_dispatch: |
3 | 4 | push: |
4 | 5 | branches: |
5 | | - - '**' |
6 | | - tags-ignore: |
7 | | - - '**' |
8 | | - # Triggers the workflow on labeled PRs only. |
| 6 | + - "master" |
| 7 | + # Triggers the workflow on PRs to master branch only. |
9 | 8 | pull_request_target: |
10 | | - types: [ labeled ] |
| 9 | + types: [opened, synchronize] |
| 10 | + branches: |
| 11 | + - "master" |
| 12 | + |
11 | 13 | # Ensures that only the latest commit is running for each PR at a time. |
12 | 14 | concurrency: |
13 | 15 | group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.ref }} |
14 | 16 | cancel-in-progress: true |
15 | 17 | jobs: |
16 | 18 | Artifactory-Tests: |
17 | | - if: contains(github.event.pull_request.labels.*.name, 'safe to test') || github.event_name == 'push' |
18 | | - name: ${{ matrix.suite }} ${{ matrix.os }} |
| 19 | + name: ${{ matrix.suite }} ${{ matrix.os.name }} |
19 | 20 | strategy: |
20 | 21 | fail-fast: false |
21 | 22 | matrix: |
22 | | - suite: [ artifactory, artifactoryProject ] |
23 | | - os: [ ubuntu, windows, macos ] |
24 | | - runs-on: ${{ matrix.os }}-latest |
| 23 | + suite: [artifactory, artifactoryProject] |
| 24 | + os: |
| 25 | + - name: ubuntu |
| 26 | + version: latest |
| 27 | + - name: windows |
| 28 | + version: latest |
| 29 | + - name: macos |
| 30 | + version: latest |
| 31 | + runs-on: ${{ matrix.os.name }}-${{ matrix.os.version }} |
25 | 32 | env: |
26 | 33 | JFROG_CLI_LOG_LEVEL: DEBUG |
27 | 34 | steps: |
| 35 | + - name: Skip macOS - JGC-413 |
| 36 | + if: matrix.os.name == 'macos' |
| 37 | + run: | |
| 38 | + echo "::warning::JGC-413 - Skip until artifactory bootstrap in osx is fixed" |
| 39 | + exit 0 |
| 40 | +
|
28 | 41 | - name: Checkout code |
| 42 | + if: matrix.os.name != 'macos' |
29 | 43 | uses: actions/checkout@v4 |
30 | 44 | with: |
31 | 45 | ref: ${{ github.event.pull_request.head.sha }} |
32 | 46 |
|
33 | 47 | - name: Setup Go with cache |
| 48 | + if: matrix.os.name != 'macos' |
34 | 49 | uses: jfrog/.github/actions/install-go-with-cache@main |
35 | 50 |
|
| 51 | + - name: Debug macOS Environment and Set Timeout |
| 52 | + if: runner.os == 'macOS' |
| 53 | + run: | |
| 54 | + echo "=== macOS Debug Information ===" |
| 55 | + echo "Architecture: $(uname -m)" |
| 56 | + echo "macOS Version: $(sw_vers -productVersion)" |
| 57 | + echo "macOS Build: $(sw_vers -buildVersion)" |
| 58 | + echo "Available memory: $(system_profiler SPHardwareDataType | grep Memory || echo 'Memory info not available')" |
| 59 | + echo "Available disk space: $(df -h)" |
| 60 | + echo "Java version: $(java -version 2>&1 || echo 'Java not found')" |
| 61 | + echo "Go version: $(go version)" |
| 62 | + echo "Setting RT_CONNECTION_TIMEOUT_SECONDS to 2400 for macOS" |
| 63 | + echo "RT_CONNECTION_TIMEOUT_SECONDS=2400" >> $GITHUB_ENV |
| 64 | +
|
36 | 65 | - name: Install local Artifactory |
| 66 | + if: matrix.os.name != 'macos' |
37 | 67 | uses: jfrog/.github/actions/install-local-artifactory@main |
38 | 68 | with: |
39 | 69 | RTLIC: ${{ secrets.RTLIC }} |
| 70 | + RT_CONNECTION_TIMEOUT_SECONDS: ${{ env.RT_CONNECTION_TIMEOUT_SECONDS || '1200' }} |
40 | 71 |
|
41 | 72 | - name: Run Artifactory tests |
| 73 | + if: ${{ matrix.suite == 'artifactory' && matrix.os.name != 'macos' }} |
42 | 74 | run: go test -v github.com/jfrog/jfrog-cli --timeout 0 --test.artifactory --jfrog.url=http://127.0.0.1:8082 --jfrog.adminToken=${{ env.JFROG_TESTS_LOCAL_ACCESS_TOKEN }} |
43 | | - if: ${{ matrix.suite == 'artifactory' }} |
44 | 75 |
|
45 | 76 | - name: Run Artifactory projects tests |
| 77 | + if: ${{ matrix.suite == 'artifactoryProject' && matrix.os.name != 'macos' }} |
46 | 78 | run: go test -v github.com/jfrog/jfrog-cli --timeout 0 --test.artifactoryProject --ci.runId=${{ runner.os }}-${{ matrix.suite }} |
47 | | - if: ${{ matrix.suite == 'artifactoryProject' }} |
|
0 commit comments