From 272d3d6a7faa2e4f2f4c3876cf72457d674e4b6b Mon Sep 17 00:00:00 2001 From: Christian Millar Date: Thu, 12 Dec 2024 23:33:41 +0000 Subject: [PATCH 01/14] [TRUNK-13813] Smoke test debugging Fixes for issues that revealed themselves as we ran the workflow --- .github/workflows/smoke_test.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/smoke_test.yml b/.github/workflows/smoke_test.yml index 19aaa46c..12686512 100644 --- a/.github/workflows/smoke_test.yml +++ b/.github/workflows/smoke_test.yml @@ -12,7 +12,9 @@ jobs: steps: - name: Get Release run: | - curl -fsSLO --retry 3 https://github.com/trunk-io/analytics-cli/releases/download/${{ env.RELEASE }}/trunk-analytics-cli-x86_64-unknown-linux.tar.gz && chmod +x trunk + curl -fsSLO --retry 3 https://github.com/trunk-io/analytics-cli/releases/download/${{ env.RELEASE }}/trunk-analytics-cli-x86_64-unknown-linux.tar.gz + tar -zxf trunk-analytics-cli-x86_64-unknown-linux.tar.gz + chmod +x trunk-analytics-cli - name: Setup Rust & Cargo uses: ./.github/actions/setup_rust_cargo From 2b52d9d20ae4b7bc1665bb6775ca36d91681f4a2 Mon Sep 17 00:00:00 2001 From: Christian Millar Date: Thu, 12 Dec 2024 23:37:10 +0000 Subject: [PATCH 02/14] Add checkout --- .github/workflows/smoke_test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/smoke_test.yml b/.github/workflows/smoke_test.yml index 12686512..723c61e6 100644 --- a/.github/workflows/smoke_test.yml +++ b/.github/workflows/smoke_test.yml @@ -16,6 +16,9 @@ jobs: tar -zxf trunk-analytics-cli-x86_64-unknown-linux.tar.gz chmod +x trunk-analytics-cli + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Rust & Cargo uses: ./.github/actions/setup_rust_cargo From 40dbb996f7fbb46c3213b3bef7b53a8f6bdcf64d Mon Sep 17 00:00:00 2001 From: Christian Millar Date: Thu, 12 Dec 2024 23:40:18 +0000 Subject: [PATCH 03/14] Remove unneeded cd --- .github/workflows/smoke_test.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/smoke_test.yml b/.github/workflows/smoke_test.yml index 723c61e6..cabc9cf8 100644 --- a/.github/workflows/smoke_test.yml +++ b/.github/workflows/smoke_test.yml @@ -24,5 +24,4 @@ jobs: - name: Run succeeding test run: | - cd cli-smoke-test - ../trunk-analytics-cli test cargo nextest always_succeeds --profile ci + ./trunk-analytics-cli test cargo nextest always_succeeds --profile ci From 0d2ac9132b5533b12b8990cf4770b379c15b0c46 Mon Sep 17 00:00:00 2001 From: Christian Millar Date: Thu, 12 Dec 2024 23:44:20 +0000 Subject: [PATCH 04/14] Add debugs to look for files --- .github/workflows/smoke_test.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/smoke_test.yml b/.github/workflows/smoke_test.yml index cabc9cf8..21b67405 100644 --- a/.github/workflows/smoke_test.yml +++ b/.github/workflows/smoke_test.yml @@ -10,18 +10,24 @@ jobs: name: Build cli from release runs-on: public-amd64-2xlarge steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Get Release run: | curl -fsSLO --retry 3 https://github.com/trunk-io/analytics-cli/releases/download/${{ env.RELEASE }}/trunk-analytics-cli-x86_64-unknown-linux.tar.gz tar -zxf trunk-analytics-cli-x86_64-unknown-linux.tar.gz chmod +x trunk-analytics-cli - - name: Checkout - uses: actions/checkout@v4 - - name: Setup Rust & Cargo uses: ./.github/actions/setup_rust_cargo + - name: Debugging + run: | + pwd + ls + ls ../ + - name: Run succeeding test run: | ./trunk-analytics-cli test cargo nextest always_succeeds --profile ci From f03d398b6ccea8010ffa436da7f0e67ee84dd420 Mon Sep 17 00:00:00 2001 From: Christian Millar Date: Thu, 12 Dec 2024 23:56:34 +0000 Subject: [PATCH 05/14] Added missing flags to cli invocation --- .github/workflows/smoke_test.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/smoke_test.yml b/.github/workflows/smoke_test.yml index 21b67405..a4ccc25f 100644 --- a/.github/workflows/smoke_test.yml +++ b/.github/workflows/smoke_test.yml @@ -22,12 +22,13 @@ jobs: - name: Setup Rust & Cargo uses: ./.github/actions/setup_rust_cargo - - name: Debugging - run: | - pwd - ls - ls ../ - - name: Run succeeding test + env: + TRUNK_PUBLIC_API_ADDRESS: https://api.trunk-staging.io + shell: bash run: | - ./trunk-analytics-cli test cargo nextest always_succeeds --profile ci + ./trunk-analytics-cli test \ + --org-url-slug trunk-staging-org \ + --junit-paths target/nextest/ci/junit.xml \ + --token ${{ secrets.TRUNK_STAGING_ORG_API_TOKEN }} + cargo nextest always_succeeds --profile ci From 6b51794b5d0ba1234363eb53634f503b8a575879 Mon Sep 17 00:00:00 2001 From: Christian Millar Date: Fri, 13 Dec 2024 00:05:24 +0000 Subject: [PATCH 06/14] Nextest needs a run command --- .github/workflows/smoke_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/smoke_test.yml b/.github/workflows/smoke_test.yml index a4ccc25f..574708f3 100644 --- a/.github/workflows/smoke_test.yml +++ b/.github/workflows/smoke_test.yml @@ -31,4 +31,4 @@ jobs: --org-url-slug trunk-staging-org \ --junit-paths target/nextest/ci/junit.xml \ --token ${{ secrets.TRUNK_STAGING_ORG_API_TOKEN }} - cargo nextest always_succeeds --profile ci + cargo nextest run always_succeeds --profile ci From 922548507549a2da4a67492cd316700ddc84aee1 Mon Sep 17 00:00:00 2001 From: Christian Millar Date: Fri, 13 Dec 2024 00:09:38 +0000 Subject: [PATCH 07/14] Backslash --- .github/workflows/smoke_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/smoke_test.yml b/.github/workflows/smoke_test.yml index 574708f3..358ca09e 100644 --- a/.github/workflows/smoke_test.yml +++ b/.github/workflows/smoke_test.yml @@ -30,5 +30,5 @@ jobs: ./trunk-analytics-cli test \ --org-url-slug trunk-staging-org \ --junit-paths target/nextest/ci/junit.xml \ - --token ${{ secrets.TRUNK_STAGING_ORG_API_TOKEN }} + --token ${{ secrets.TRUNK_STAGING_ORG_API_TOKEN }} \ cargo nextest run always_succeeds --profile ci From 4e401d4598b80a27e2a39cdffce265742dafab88 Mon Sep 17 00:00:00 2001 From: Christian Millar Date: Fri, 13 Dec 2024 00:13:32 +0000 Subject: [PATCH 08/14] Installing nextest is necessary --- .github/workflows/smoke_test.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/smoke_test.yml b/.github/workflows/smoke_test.yml index 358ca09e..4c25fa05 100644 --- a/.github/workflows/smoke_test.yml +++ b/.github/workflows/smoke_test.yml @@ -22,6 +22,11 @@ jobs: - name: Setup Rust & Cargo uses: ./.github/actions/setup_rust_cargo + - name: Install Nextest + shell: bash + run: | + cargo install nextest + - name: Run succeeding test env: TRUNK_PUBLIC_API_ADDRESS: https://api.trunk-staging.io From 79612193a03291f475192a0d51ca26e55cfd0be0 Mon Sep 17 00:00:00 2001 From: Christian Millar Date: Fri, 13 Dec 2024 00:18:25 +0000 Subject: [PATCH 09/14] wrong target --- .github/workflows/smoke_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/smoke_test.yml b/.github/workflows/smoke_test.yml index 4c25fa05..571b3445 100644 --- a/.github/workflows/smoke_test.yml +++ b/.github/workflows/smoke_test.yml @@ -25,7 +25,7 @@ jobs: - name: Install Nextest shell: bash run: | - cargo install nextest + cargo install cargo-nextest - name: Run succeeding test env: From 2325181281ea20bc514812e049687d0b2163018d Mon Sep 17 00:00:00 2001 From: Christian Millar Date: Fri, 13 Dec 2024 00:26:31 +0000 Subject: [PATCH 10/14] Our rustc is slightly too old for the latest nextest --- .github/workflows/smoke_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/smoke_test.yml b/.github/workflows/smoke_test.yml index 571b3445..ae5d32f2 100644 --- a/.github/workflows/smoke_test.yml +++ b/.github/workflows/smoke_test.yml @@ -25,7 +25,7 @@ jobs: - name: Install Nextest shell: bash run: | - cargo install cargo-nextest + cargo install --version 0.9.85 cargo-nextest - name: Run succeeding test env: From f3e7811f32933ab976a1e74016b8066e3b7329ae Mon Sep 17 00:00:00 2001 From: Christian Millar Date: Fri, 13 Dec 2024 00:35:40 +0000 Subject: [PATCH 11/14] We need cmake to run tests --- .github/workflows/smoke_test.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/smoke_test.yml b/.github/workflows/smoke_test.yml index ae5d32f2..da386534 100644 --- a/.github/workflows/smoke_test.yml +++ b/.github/workflows/smoke_test.yml @@ -27,6 +27,11 @@ jobs: run: | cargo install --version 0.9.85 cargo-nextest + - name: Install cmake + shell: bash + run: | + sudo apt-get install cmake -y + - name: Run succeeding test env: TRUNK_PUBLIC_API_ADDRESS: https://api.trunk-staging.io From eb3318b82d480c4500d4e19d47a17428755350b8 Mon Sep 17 00:00:00 2001 From: Christian Millar Date: Fri, 13 Dec 2024 00:50:46 +0000 Subject: [PATCH 12/14] junit file issues --- .github/workflows/smoke_test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/smoke_test.yml b/.github/workflows/smoke_test.yml index da386534..93bf13db 100644 --- a/.github/workflows/smoke_test.yml +++ b/.github/workflows/smoke_test.yml @@ -35,10 +35,11 @@ jobs: - name: Run succeeding test env: TRUNK_PUBLIC_API_ADDRESS: https://api.trunk-staging.io + RUST_BACKTRACE: 1 shell: bash run: | ./trunk-analytics-cli test \ --org-url-slug trunk-staging-org \ - --junit-paths target/nextest/ci/junit.xml \ + --junit-paths ${{ github.workspace }}/target/**/*junit.xml \ --token ${{ secrets.TRUNK_STAGING_ORG_API_TOKEN }} \ cargo nextest run always_succeeds --profile ci From d4b2c3f38e1c91c51462df02329c7e131418822c Mon Sep 17 00:00:00 2001 From: Christian Millar Date: Fri, 13 Dec 2024 01:08:59 +0000 Subject: [PATCH 13/14] Fuller backtrace for xcresult error --- .github/workflows/smoke_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/smoke_test.yml b/.github/workflows/smoke_test.yml index 93bf13db..1d1989e6 100644 --- a/.github/workflows/smoke_test.yml +++ b/.github/workflows/smoke_test.yml @@ -35,7 +35,7 @@ jobs: - name: Run succeeding test env: TRUNK_PUBLIC_API_ADDRESS: https://api.trunk-staging.io - RUST_BACKTRACE: 1 + RUST_BACKTRACE: full shell: bash run: | ./trunk-analytics-cli test \ From 944137468e844b7c83b7792cf5d7fa4b9416ba67 Mon Sep 17 00:00:00 2001 From: Christian Millar Date: Fri, 13 Dec 2024 01:25:01 +0000 Subject: [PATCH 14/14] Switch to package-only to hopefully bypass weird xcresult issues --- .github/workflows/smoke_test.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/smoke_test.yml b/.github/workflows/smoke_test.yml index 1d1989e6..270426b5 100644 --- a/.github/workflows/smoke_test.yml +++ b/.github/workflows/smoke_test.yml @@ -35,11 +35,10 @@ jobs: - name: Run succeeding test env: TRUNK_PUBLIC_API_ADDRESS: https://api.trunk-staging.io - RUST_BACKTRACE: full shell: bash run: | ./trunk-analytics-cli test \ --org-url-slug trunk-staging-org \ --junit-paths ${{ github.workspace }}/target/**/*junit.xml \ --token ${{ secrets.TRUNK_STAGING_ORG_API_TOKEN }} \ - cargo nextest run always_succeeds --profile ci + cargo nextest run -p smoke-test --profile ci