Pull Request for 17/merge by riya-n #131
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pull Request | |
run-name: Pull Request for ${{ github.ref_name }} by ${{ github.actor }} | |
concurrency: | |
group: ${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
permissions: write-all | |
on: | |
pull_request: {} | |
workflow_dispatch: {} | |
push: | |
branches: | |
- trunk-merge/** | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build_release: | |
strategy: | |
matrix: | |
target: [x86_64-unknown-linux-musl, x86_64-unknown-linux-gnu] | |
name: Build CLI for ${{ matrix.target }} | |
runs-on: [self-hosted, linux] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Rust toolchain | |
uses: dtolnay/rust-toolchain@nightly | |
- name: Build ${{ matrix.target }} target | |
uses: ./.github/actions/build_target | |
if: "!cancelled()" | |
with: | |
target: ${{ matrix.target }} | |
- name: Install nextest | |
run: curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin | |
- name: Run tests | |
run: cargo nextest run --profile=ci | |
- name: Upload results using action from ${{ matrix.target }} | |
env: | |
TRUNK_API_ADDRESS: https://api.trunk-staging.io/v1/metrics/createBundleUpload | |
run: | | |
target/${{ matrix.target }}/release/trunk-analytics-cli upload \ | |
--junit-paths ${{ github.workspace }}/target/**/*junit.xml \ | |
--org-url-slug trunk-staging-org \ | |
--token ${{ secrets.TRUNK_STAGING_ORG_API_TOKEN }} | |
build: | |
name: Unit Tests | |
runs-on: [self-hosted, linux] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust toolchain | |
uses: dtolnay/rust-toolchain@nightly | |
- name: Build | |
run: cargo build -q --all | |
- name: Install nextest | |
run: curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin | |
- name: Run tests | |
run: cargo nextest run --profile=ci | |
- name: Upload results using action | |
if: "!cancelled()" | |
uses: trunk-io/analytics-uploader@main | |
with: | |
junit-paths: ${{ github.workspace }}/target/**/*junit.xml | |
org-slug: trunk | |
token: ${{ secrets.TRUNK_PROD_ORG_API_TOKEN }} | |
- name: Upload results cli release built from source | |
if: "!cancelled()" | |
env: | |
TRUNK_API_ADDRESS: https://api.trunk-staging.io/v1/metrics/createBundleUpload | |
run: | | |
cargo run --release -- upload \ | |
--junit-paths ${{ github.workspace }}/target/**/*junit.xml \ | |
--org-url-slug trunk-staging-org \ | |
--token ${{ secrets.TRUNK_STAGING_ORG_API_TOKEN }} |