mirror of
https://github.com/Magnus167/rustframe.git
synced 2025-08-20 04:00:01 +00:00
Refactor GitHub Actions workflow to streamline unit tests and add example tests
This commit is contained in:
parent
44ff16a0bb
commit
26213b28d6
9
.github/workflows/run-unit-tests.yml
vendored
9
.github/workflows/run-unit-tests.yml
vendored
@ -12,14 +12,12 @@ concurrency:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pick-runner:
|
pick-runner:
|
||||||
|
|
||||||
if: github.event.pull_request.draft == false
|
if: github.event.pull_request.draft == false
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
runner: ${{ steps.choose.outputs.use-runner }}
|
runner: ${{ steps.choose.outputs.use-runner }}
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- id: choose
|
- id: choose
|
||||||
uses: ./.github/actions/runner-fallback
|
uses: ./.github/actions/runner-fallback
|
||||||
@ -27,7 +25,6 @@ jobs:
|
|||||||
primary-runner: "self-hosted"
|
primary-runner: "self-hosted"
|
||||||
fallback-runner: "ubuntu-latest"
|
fallback-runner: "ubuntu-latest"
|
||||||
github-token: ${{ secrets.CUSTOM_GH_TOKEN }}
|
github-token: ${{ secrets.CUSTOM_GH_TOKEN }}
|
||||||
|
|
||||||
|
|
||||||
run-unit-tests:
|
run-unit-tests:
|
||||||
needs: pick-runner
|
needs: pick-runner
|
||||||
@ -56,6 +53,12 @@ jobs:
|
|||||||
- name: Test docs generation
|
- name: Test docs generation
|
||||||
run: cargo doc --no-deps --release
|
run: cargo doc --no-deps --release
|
||||||
|
|
||||||
|
- name: Test examples
|
||||||
|
run: cargo test --examples --release
|
||||||
|
|
||||||
|
- name: Cargo test all targets
|
||||||
|
run: cargo test --all-targets --release
|
||||||
|
|
||||||
- name: Upload coverage to Codecov
|
- name: Upload coverage to Codecov
|
||||||
uses: codecov/codecov-action@v3
|
uses: codecov/codecov-action@v3
|
||||||
with:
|
with:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user