chore: resolve unused imports if feature flags are disabled #12849
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
name: Unit tests | |
# Cancel workflow if there is a new change to the branch. | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
on: | |
workflow_dispatch: | |
merge_group: | |
pull_request: | |
branches: | |
- main | |
# This needs to be declared explicitly so that the job is actually | |
# run when moved out of draft. | |
types: [opened, synchronize, reopened, ready_for_review] | |
paths-ignore: | |
- 'docs/' | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- 'docs/' | |
schedule: | |
- cron: "0 0 * * *" | |
env: | |
CI: 1 | |
CARGO_INCREMENTAL: 0 | |
CACHE_TIMEOUT_MINUTES: 5 | |
RUSTC_WRAPPER: "sccache" | |
CC: "sccache clang" | |
CXX: "sccache clang++" | |
jobs: | |
tests: | |
# Change to `buildjet-8vcpu-ubuntu-2204` if `fuzzy` is down. | |
# runs-on: fuzzy | |
runs-on: buildjet-8vcpu-ubuntu-2204 | |
# Run the job only if the PR is not a draft. | |
# This is done to limit the runner cost. | |
if: github.event.pull_request.draft == false | |
timeout-minutes: 30 | |
steps: | |
- name: Checkout Sources | |
uses: actions/checkout@v4 | |
- name: Setup sccache | |
uses: mozilla-actions/[email protected] | |
timeout-minutes: ${{ fromJSON(env.CACHE_TIMEOUT_MINUTES) }} | |
continue-on-error: true | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: "go.work" | |
- name: install nextest | |
uses: taiki-e/install-action@nextest | |
- run: make test | |
tests-release: | |
# Change to `buildjet-8vcpu-ubuntu-2204` if `fuzzy` is down. | |
# runs-on: fuzzy | |
runs-on: buildjet-8vcpu-ubuntu-2204 | |
# Run the job only if the PR is not a draft. | |
# This is done to limit the runner cost. | |
if: github.event.pull_request.draft == false | |
timeout-minutes: 30 | |
steps: | |
# find the nearest S3 space for storing cache files | |
- name: Show IP | |
run: curl ifconfig.me | |
continue-on-error: true | |
- name: Checkout Sources | |
uses: actions/checkout@v4 | |
- name: Setup sccache | |
uses: mozilla-actions/[email protected] | |
timeout-minutes: ${{ fromJSON(env.CACHE_TIMEOUT_MINUTES) }} | |
continue-on-error: true | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: "go.work" | |
- name: install nextest | |
uses: taiki-e/install-action@nextest | |
- run: make test-release |