Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TRUNK-13813] Smoke test PRs #240

Merged
merged 5 commits into from
Dec 17, 2024
Merged

Conversation

cmillar-trunk
Copy link
Contributor

Adds the smoke test to prs. Does not notify slack to avoid noise.

Adds the smoke test to prs. Does not notify slack to avoid noise.
Copy link

trunk-io bot commented Dec 16, 2024

😎 Merged successfully - details.

TRUNK_PUBLIC_API_ADDRESS: https://api.trunk-staging.io
shell: bash
run: |
./target/x86_64-unknown-linux-musl/release/trunk-analytics-cli test \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to run on latest build or the currently latest in the github action. I could see value for both but I think we definitely at least want the latter

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is triggered on prs, I want it running on the pr branch. Unless I've horribly misunderstood workflows, using the checkout with ref: ${{ github.base_ref }} should be putting us there, right?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this needs to be a separate test then, but I would really like to test staging services against what is latest in the GH action

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, agreed. We want testing of main and we want testing of a "pinned" version for both staging and prod.

Additionally, I don't mind a PR smoke test, but I don't think it's as needed right now as the above.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, gotcha. I'll pivot this to do that instead and post to channel.

Comment on lines 22 to 40
- name: Setup Rust & Cargo
uses: ./.github/actions/setup_rust_cargo

- name: Install Nextest
shell: bash
run: |
cargo install --version 0.9.85 cargo-nextest --locked

- 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
shell: bash
run: |
./target/x86_64-unknown-linux-musl/release/trunk-analytics-cli test \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If most of these steps are shared across smoke test workflows, let's make an action to keep things DRY

- name: Setup Rust & Cargo
uses: ./.github/actions/setup_rust_cargo
- name: Install Nextest
shell: bash
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
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 -p smoke-test --profile ci

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point; refactored

Copy link

trunk-staging-io bot commented Dec 16, 2024

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

@cmillar-trunk cmillar-trunk marked this pull request as ready for review December 16, 2024 20:38
Copy link
Member

@dfrankland dfrankland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@trunk-io trunk-io bot merged commit e96e5c0 into main Dec 17, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants