Skip to content

Commit

Permalink
Added github actions for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
0xCCF4 committed Mar 30, 2024
1 parent bbaadc2 commit 7a5069c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 28 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,16 @@ jobs:

steps:
- uses: actions/checkout@master
- uses: actions-rust-lang/setup-rust-toolchain@v1.8.0
with:
toolchain: "stable"

- name: Build
run: cargo build --verbose

- name: Run tests
run: cargo test --verbose

- name: Compile and release
uses: rust-build/rust-build.action@v1.4.4
env:
Expand All @@ -31,6 +37,7 @@ jobs:
RUSTTARGET: ${{ matrix.target }}
ARCHIVE_TYPES: ${{ matrix.archive }}
TOOLCHAIN_VERSION: stable

permissions:
contents: write

28 changes: 0 additions & 28 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,31 +23,3 @@ jobs:

- name: Build with stable toolchain
run: cargo build --verbose

- uses: actions-rust-lang/setup-rust-toolchain@v1.8.0
with:
toolchain: "nightly"

- name: Build with nightly toolchain
run: cargo build --verbose

- name: Run tests
# note: we don't handle errors here as the 'mikepenz/action-junit-report' below will fail if there
# was an error
run: |
cargo test -- -Z unstable-options --format json --report-time | tee results.json
- name: Prepare junit report
id: cargo_reporter
uses: innoq/action-cargo-test-report@v1
with:
cargo-test-report-json: 'results.json'

- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
if: always() # always run even if the previous step fails
with:
check_name: Test Report
fail_on_failure: true
require_tests: true
summary: ${{ steps.cargo_reporter.outputs.summary }}

0 comments on commit 7a5069c

Please sign in to comment.