-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0d69346
commit 8f91cc0
Showing
4 changed files
with
97 additions
and
64 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Code Coverage | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
check: | ||
name: Check | ||
runs-on: ubuntu-latest | ||
|
||
container: | ||
image: xd009642/tarpaulin:develop-nightly | ||
options: --security-opt seccomp=unconfined | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Run `cargo-tarpaulin` | ||
run: | | ||
cargo +nightly tarpaulin --verbose --all-features --workspace --timeout 120 --out xml --fail-under 50 | ||
- name: Upload to codecov.io | ||
uses: codecov/codecov-action@v1.0.2 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
- name: Archive Results | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: code-coverage-report | ||
path: cobertura.xml |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,48 @@ | ||
name: Unit tests | ||
name: Unit Tests | ||
permissions: | ||
checks: write | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
test: | ||
name: coverage | ||
name: Check | ||
runs-on: ubuntu-latest | ||
container: | ||
image: xd009642/tarpaulin:develop-nightly | ||
options: --security-opt seccomp=unconfined | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Generate code coverage | ||
- name: Setup Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly | ||
override: true | ||
|
||
- name: Run `cargo test` | ||
run: | | ||
cargo +nightly tarpaulin --verbose --all-features --workspace --timeout 120 --out xml --fail-under 50 | ||
cargo test -- -Z unstable-options --format json --report-time | tee results.json | ||
- name: Prepare JUnit Report | ||
id: report | ||
uses: innoq/action-cargo-test-report@main | ||
with: | ||
cargo-test-report-json: 'results.json' | ||
|
||
- name: Publish Test Report | ||
uses: mikepenz/action-junit-report@main | ||
if: always() | ||
with: | ||
check_name: Report | ||
fail_on_failure: true | ||
require_tests: true | ||
summary: ${{ steps.report.outputs.summary }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
sonar.host.url=https://sonarcloud.io | ||
sonar.projectKey=postech-5soat-grupo-25_tech-challenge-pedido-produto | ||
sonar.organization=postech-5soat-grupo-25 | ||
sonar.sources=src | ||
sonar.host.url=https://sonarcloud.io | ||
sonar.language=rust | ||
sonar.externalIssuesReportPaths=sonar-issues.json |