From 70529ae627a74f3362a25230798d66b116b1fced Mon Sep 17 00:00:00 2001 From: Reshmi Date: Tue, 23 Dec 2025 12:17:49 +0530 Subject: [PATCH 1/3] Add Conan tests workflow --- .github/workflows/conanTests.yml | 63 ++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 .github/workflows/conanTests.yml diff --git a/.github/workflows/conanTests.yml b/.github/workflows/conanTests.yml new file mode 100644 index 000000000..d929d1f76 --- /dev/null +++ b/.github/workflows/conanTests.yml @@ -0,0 +1,63 @@ +name: Conan Tests +on: + workflow_dispatch: + push: + branches: + - "master" + # Triggers the workflow on PRs to master branch only. + pull_request_target: + types: [labeled] + branches: + - "master" + +# Ensures that only the latest commit is running for each PR at a time. +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.ref }} + cancel-in-progress: true +permissions: + id-token: write + contents: read +jobs: + Conan-Tests: + name: Conan tests (${{ matrix.os.name }}) + if: github.event_name == 'workflow_dispatch' || github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'safe to test') + strategy: + fail-fast: false + matrix: + os: + - name: ubuntu + version: 24.04 + - name: windows + version: 2022 + - name: macos + version: 14 + runs-on: ${{ matrix.os.name }}-${{ matrix.os.version }} + steps: + - name: Checkout code + uses: actions/checkout@v5 + with: + ref: ${{ github.event.pull_request.head.sha || github.ref }} + + - name: Setup Go with cache + uses: jfrog/.github/actions/install-go-with-cache@main + + - name: Install Conan + uses: turtlebrowser/get-conan@main + with: + version: '2.10.2' + + - name: Install local Artifactory + uses: jfrog/.github/actions/install-local-artifactory@main + with: + RTLIC: ${{ secrets.RTLIC }} + RT_CONNECTION_TIMEOUT_SECONDS: '1200' + + - name: Get ID Token and Exchange Token + shell: bash + run: | + ID_TOKEN=$(curl -sLS -H "User-Agent: actions/oidc-client" -H "Authorization: Bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \ + "${ACTIONS_ID_TOKEN_REQUEST_URL}&audience=jfrog-github" | jq .value | tr -d '"') + echo "JFROG_CLI_OIDC_EXCHANGE_TOKEN_ID=${ID_TOKEN}" >> $GITHUB_ENV + + - name: Run Conan tests + run: go test -v github.com/jfrog/jfrog-cli --timeout 0 --test.conan --jfrog.url=http://127.0.0.1:8082 --jfrog.adminToken=${{ env.JFROG_TESTS_LOCAL_ACCESS_TOKEN }} From f9b991f31f81c697c9c3b2b632dc51de160111fd Mon Sep 17 00:00:00 2001 From: Reshmi Date: Tue, 23 Dec 2025 12:28:50 +0530 Subject: [PATCH 2/3] update workflow --- .github/workflows/conanTests.yml | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/.github/workflows/conanTests.yml b/.github/workflows/conanTests.yml index d929d1f76..d2ef04dc1 100644 --- a/.github/workflows/conanTests.yml +++ b/.github/workflows/conanTests.yml @@ -4,19 +4,14 @@ on: push: branches: - "master" - # Triggers the workflow on PRs to master branch only. pull_request_target: types: [labeled] branches: - "master" -# Ensures that only the latest commit is running for each PR at a time. concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.ref }} cancel-in-progress: true -permissions: - id-token: write - contents: read jobs: Conan-Tests: name: Conan tests (${{ matrix.os.name }}) @@ -33,31 +28,35 @@ jobs: version: 14 runs-on: ${{ matrix.os.name }}-${{ matrix.os.version }} steps: + - name: Skip macOS - JGC-413 + if: matrix.os.name == 'macos' + run: | + echo "::warning::JGC-413 - Skip until artifactory bootstrap in osx is fixed" + exit 0 + - name: Checkout code + if: matrix.os.name != 'macos' uses: actions/checkout@v5 with: ref: ${{ github.event.pull_request.head.sha || github.ref }} - name: Setup Go with cache + if: matrix.os.name != 'macos' uses: jfrog/.github/actions/install-go-with-cache@main - name: Install Conan + if: matrix.os.name != 'macos' uses: turtlebrowser/get-conan@main with: version: '2.10.2' - name: Install local Artifactory + if: matrix.os.name != 'macos' uses: jfrog/.github/actions/install-local-artifactory@main with: RTLIC: ${{ secrets.RTLIC }} RT_CONNECTION_TIMEOUT_SECONDS: '1200' - - name: Get ID Token and Exchange Token - shell: bash - run: | - ID_TOKEN=$(curl -sLS -H "User-Agent: actions/oidc-client" -H "Authorization: Bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \ - "${ACTIONS_ID_TOKEN_REQUEST_URL}&audience=jfrog-github" | jq .value | tr -d '"') - echo "JFROG_CLI_OIDC_EXCHANGE_TOKEN_ID=${ID_TOKEN}" >> $GITHUB_ENV - - name: Run Conan tests - run: go test -v github.com/jfrog/jfrog-cli --timeout 0 --test.conan --jfrog.url=http://127.0.0.1:8082 --jfrog.adminToken=${{ env.JFROG_TESTS_LOCAL_ACCESS_TOKEN }} + if: matrix.os.name != 'macos' + run: go test -v github.com/jfrog/jfrog-cli --timeout 0 --test.conan From 3e28a98c8fb5f118769ad9b27ddb8894e423dab3 Mon Sep 17 00:00:00 2001 From: Reshmi Date: Tue, 23 Dec 2025 14:02:38 +0530 Subject: [PATCH 3/3] Add Conan profile detect step to workflow --- .github/workflows/conanTests.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/conanTests.yml b/.github/workflows/conanTests.yml index d2ef04dc1..eb28582b5 100644 --- a/.github/workflows/conanTests.yml +++ b/.github/workflows/conanTests.yml @@ -50,6 +50,10 @@ jobs: with: version: '2.10.2' + - name: Setup Conan profile + if: matrix.os.name != 'macos' + run: conan profile detect + - name: Install local Artifactory if: matrix.os.name != 'macos' uses: jfrog/.github/actions/install-local-artifactory@main