diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml deleted file mode 100644 index 48d886deaa7e..000000000000 --- a/.github/workflows/coverage.yml +++ /dev/null @@ -1,70 +0,0 @@ -on: - pull_request: - types: [opened, synchronize, reopened, ready_for_review] - paths-ignore: - - 'docs/**' - - 'config/**' - - '**.md' - - '.dockerignore' - - 'docker/**' - - '.gitignore' - push: - branches: - - "main" - - "develop" - paths-ignore: - - 'docs/**' - - 'config/**' - - '**.md' - - '.dockerignore' - - 'docker/**' - - '.gitignore' - workflow_dispatch: - -name: Code coverage - -env: - RUST_TOOLCHAIN: nightly-2022-12-20 - -jobs: - coverage: - if: github.event.pull_request.draft == false - runs-on: ubuntu-latest-8-cores - timeout-minutes: 60 - steps: - - uses: actions/checkout@v3 - - uses: arduino/setup-protoc@v1 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - - uses: KyleMayes/install-llvm-action@v1 - with: - version: "14.0" - - name: Install toolchain - uses: dtolnay/rust-toolchain@master - with: - toolchain: ${{ env.RUST_TOOLCHAIN }} - components: llvm-tools-preview - - name: Rust Cache - uses: Swatinem/rust-cache@v2 - - name: Install latest nextest release - uses: taiki-e/install-action@nextest - - name: Install cargo-llvm-cov - uses: taiki-e/install-action@cargo-llvm-cov - - name: Collect coverage data - run: cargo llvm-cov nextest --workspace --lcov --output-path lcov.info - env: - CARGO_BUILD_RUSTFLAGS: "-C link-arg=-fuse-ld=lld" - RUST_BACKTRACE: 1 - CARGO_INCREMENTAL: 0 - GT_S3_BUCKET: ${{ secrets.S3_BUCKET }} - GT_S3_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY_ID }} - GT_S3_ACCESS_KEY: ${{ secrets.S3_ACCESS_KEY }} - UNITTEST_LOG_DIR: "__unittest_logs" - - name: Codecov upload - uses: codecov/codecov-action@v2 - with: - token: ${{ secrets.CODECOV_TOKEN }} - files: ./lcov.info - flags: rust - fail_ci_if_error: true - verbose: true diff --git a/.github/workflows/develop.yml b/.github/workflows/develop.yml index e5ad89ba6a16..e4f9f10528fe 100644 --- a/.github/workflows/develop.yml +++ b/.github/workflows/develop.yml @@ -7,6 +7,7 @@ on: - '**.md' - '.dockerignore' - 'docker/**' + - '.gitignore' push: branches: - develop @@ -165,3 +166,45 @@ jobs: uses: Swatinem/rust-cache@v2 - name: Run cargo clippy run: cargo clippy --workspace --all-targets -- -D warnings -D clippy::print_stdout -D clippy::print_stderr + + coverage: + if: github.event.pull_request.draft == false + runs-on: ubuntu-latest-8-cores + timeout-minutes: 60 + steps: + - uses: actions/checkout@v3 + - uses: arduino/setup-protoc@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + - uses: KyleMayes/install-llvm-action@v1 + with: + version: "14.0" + - name: Install toolchain + uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ env.RUST_TOOLCHAIN }} + components: llvm-tools-preview + - name: Rust Cache + uses: Swatinem/rust-cache@v2 + - name: Install latest nextest release + uses: taiki-e/install-action@nextest + - name: Install cargo-llvm-cov + uses: taiki-e/install-action@cargo-llvm-cov + - name: Collect coverage data + run: cargo llvm-cov nextest --workspace --lcov --output-path lcov.info + env: + CARGO_BUILD_RUSTFLAGS: "-C link-arg=-fuse-ld=lld" + RUST_BACKTRACE: 1 + CARGO_INCREMENTAL: 0 + GT_S3_BUCKET: ${{ secrets.S3_BUCKET }} + GT_S3_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY_ID }} + GT_S3_ACCESS_KEY: ${{ secrets.S3_ACCESS_KEY }} + UNITTEST_LOG_DIR: "__unittest_logs" + - name: Codecov upload + uses: codecov/codecov-action@v2 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: ./lcov.info + flags: rust + fail_ci_if_error: true + verbose: true diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 000000000000..e4b2e5a7d1c0 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,55 @@ +on: + pull_request: + types: [opened, synchronize, reopened, ready_for_review] + paths: + - 'docs/**' + - 'config/**' + - '**.md' + - '.dockerignore' + - 'docker/**' + - '.gitignore' + push: + branches: + - develop + - main + paths: + - 'docs/**' + - 'config/**' + - '**.md' + - '.dockerignore' + - 'docker/**' + - '.gitignore' + workflow_dispatch: + +name: CI + +# To pass the required status check, see: +# https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks + +jobs: + check: + name: Check + if: github.event.pull_request.draft == false + runs-on: ubuntu-latest + steps: + - run: 'echo "No action required"' + + fmt: + name: Rustfmt + if: github.event.pull_request.draft == false + runs-on: ubuntu-latest + steps: + - run: 'echo "No action required"' + + clippy: + name: Clippy + if: github.event.pull_request.draft == false + runs-on: ubuntu-latest + steps: + - run: 'echo "No action required"' + + coverage: + if: github.event.pull_request.draft == false + runs-on: ubuntu-latest + steps: + - run: 'echo "No action required"'