Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
zaycev committed Jan 30, 2024
1 parent 72d66f5 commit 0f54f12
Showing 1 changed file with 44 additions and 46 deletions.
90 changes: 44 additions & 46 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,52 +36,50 @@ jobs:
with:
target: ${{ matrix.target }}

- name: Install JUnit transformer
run: cargo install cargo2junit

# - name: Install JUnit transformer
# run: cargo install cargo2junit
- name: Run tests
run: cargo test -q -- -Z unstable-options --format json --report-time | cargo2junit > ${{ github.workspace }}/target/junit.xml

# - name: Run tests
# run: cargo test -q -- -Z unstable-options --format json --report-time | cargo2junit > ${{ github.workspace }}/target/junit.xml
- 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 }}
# - name: Upload results using action from ${{ matrix.target }}
# uses: action/upload_junit_xml
# if: "!cancelled()"
# with:
# target: ${{ matrix.target }}

# if: "!cancelled()"
# 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: ubuntu-latest-8-cores
# steps:
# - uses: actions/checkout@v3
# - name: Build
# run: cargo build -q --all
# - name: Install JUnit transformer
# run: cargo install cargo2junit
# - name: Run tests
# run: cargo test --verbose -- -Z unstable-options --format json --report-time | cargo2junit > ${{ github.workspace }}/target/junit.xml
# - 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 }}
build:
name: Unit Tests
runs-on: ubuntu-latest-8-cores
steps:
- uses: actions/checkout@v3
- name: Build
run: cargo build -q --all
- name: Install JUnit transformer
run: cargo install cargo2junit
- name: Run tests
run: cargo test --verbose -- -Z unstable-options --format json --report-time | cargo2junit > ${{ github.workspace }}/target/junit.xml
- 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 }}
- name: Build ${{ matrix.target }} target
uses: ./.github/actions/build_target
if: "!cancelled()"
with:
target: ${{ matrix.target }}

0 comments on commit 0f54f12

Please sign in to comment.