Skip to content

Commit

Permalink
feat(models): alert models compatibility (#7)
Browse files Browse the repository at this point in the history
The updates across various components of the project focus on enhancing code coverage, refining data structures, and improving functionality related to alert management. Key changes include the introduction of new data structures for alert statuses similar to the python module `alerts_in_ua`, modifications to existing APIs to align with these structures, and the addition of new modules for better organization and accessibility. The project also integrates more robust testing and coverage tools, alongside updates to documentation to reflect these enhancements.
  • Loading branch information
voznik authored May 8, 2024
1 parent 6a3bb06 commit 7777f99
Show file tree
Hide file tree
Showing 39 changed files with 1,867 additions and 813 deletions.
112 changes: 71 additions & 41 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,74 @@
name: Build
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
jobs:
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis

- name: Install Rust
run: rustup update stable

- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov

- name: Install Clippy
run: rustup component add clippy

- name: Install cargo-sonar and run Clippy
run: |
cargo install cargo-sonar
cargo clippy --message-format json > clippy-report.json
# cargo sonar --clippy --clippy-path clippy-report.json --deny --outdated --udeps
cargo sonar --clippy --clippy-path clippy-report.json
- name: Generate code coverage
run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info

- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >
-Dsonar.externalIssuesReportPaths=sonar-issues.json
-Dcommunity.rust.lcov.reportPaths=lcov.info
# test:
# name: Coverage
# runs-on: ubuntu-latest
# container:
# image: xd009642/tarpaulin:develop-nightly
# options: --security-opt seccomp=unconfined
# steps:
# - name: Checkout repository
# uses: actions/checkout@v2

# - name: Generate code coverage
# run: |
# cargo +nightly tarpaulin --verbose --all-features --workspace --timeout 120 --out xml

# - name: Upload to codecov.io
# uses: codecov/codecov-action@v2
# with:
# # token: ${{secrets.CODECOV_TOKEN}} # not required for public repos
# fail_ci_if_error: true
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis

- name: Install Rust
run: rustup update stable

- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov

- name: Install Clippy
run: rustup component add clippy

- name: Install cargo-sonar and run Clippy
run: |
cargo install cargo-sonar
cargo clippy --message-format json > clippy-report.json
# cargo sonar --clippy --clippy-path clippy-report.json --deny --outdated --udeps
cargo sonar --clippy --clippy-path clippy-report.json
- name: Generate code coverage
run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info

- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >
-Dsonar.externalIssuesReportPaths=sonar-issues.json
-Dcommunity.rust.lcov.reportPaths=lcov.info
# - name: Generate code coverage
# run: |
# cargo install tarpaulin
# cargo tarpaulin --verbose --all-features --workspace --timeout 120 --out xml
# # Save coverage report in Coveralls
# - name:
# Coveralls
# if: ${{ success() }}
# uses: coverallsapp/github-action@master
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
Loading

0 comments on commit 7777f99

Please sign in to comment.