diff --git a/.github/workflows/cargo-test.yml b/.github/workflows/cargo-test.yml deleted file mode 100644 index 81d4a81e8e..0000000000 --- a/.github/workflows/cargo-test.yml +++ /dev/null @@ -1,64 +0,0 @@ -on: - push: - paths-ignore: - - "docs/**" - - "**.md" - pull_request: - paths-ignore: - - "docs/**" - - "**.md" -name: "Cargo test" -env: - RUST_TOOLCHAIN: nightly-2023-01-26 - RUST_TARGET: x86_64-unknown-linux-gnu -jobs: - build: - name: Cargo test - runs-on: ubuntu-2004-8-cores - steps: - - name: Checkout sources - uses: actions/checkout@v3 - - - name: Cache cargo assets - id: cache - uses: actions/cache@v3 - with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - target/ - key: ${{ matrix.arch }}-build-cargo-${{ hashFiles('**/Cargo.lock') }} - - - name: Install Protoc - run: | # Make sure the protoc is >= 3.15 - wget https://github.com/protocolbuffers/protobuf/releases/download/v21.12/protoc-21.12-linux-x86_64.zip - unzip protoc-21.12-linux-x86_64.zip -d protoc - sudo cp protoc/bin/protoc /usr/local/bin/ - sudo cp -r protoc/include/google /usr/local/include/ - - - name: Install dependencies - run: | - sudo apt-get -y update - sudo apt-get -y install libssl-dev pkg-config g++-aarch64-linux-gnu gcc-aarch64-linux-gnu - - - name: Install rust toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: ${{ env.RUST_TOOLCHAIN }} - target: ${{ env.RUST_TARGET }} - components: rustfmt, clippy - override: true - - - name: Output package versions - run: protoc --version ; cargo version ; rustc --version ; gcc --version ; g++ --version - - - name: Run cargo clippy - run: cargo clippy -- -A clippy::uninlined_format_args - - - name: Run cargo test - run: | - mkdir -p web/dist - touch web/dist/index.html - ./coverage.sh diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 74e36f2d4c..561ccd518f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -110,9 +110,9 @@ We check for following in CI pipeline for any pull requests. 1. Unit test code coverage for rust code. - If code coverage is less than 81% the CI tests will fail. - You can test coverage yourself by running `./coverage.sh` - - We use [cargo-llvm-cov](https://github.com/taiki-e/cargo-llvm-cov)for code generating coverage to generate report in .json format. - - Run 'cargo llvm-cov --lcov --output-path lcov.info' to genrate report & use [Coverage Gutters](https://marketplace.visualstudio.com/items?itemName=ryanluker.vscode-coverage-gutters) with VS code for visualizing code coverage. - - You can also generate html report by using 'cargo llvm-cov --html' to generate html report in target/debug/llvm-cov/html/index.html + - We use [cargo-llvm-cov](https://github.com/taiki-e/cargo-llvm-cov) to generate code coverage report in JSON format. + - Run `cargo llvm-cov --lcov --output-path lcov.info` to generate report and use [Coverage Gutters](https://marketplace.visualstudio.com/items?itemName=ryanluker.vscode-coverage-gutters) with VS code for visualizing code coverage. + - You can also generate html report by using `cargo llvm-cov --html` to generate html report in target/debug/llvm-cov/html/index.html 1. Linting in Javascript for GUI - We run eslint for javacript anf any linting failures will result in build failures. - You can test for linting failures by running `./eslint.sh` in web folder.