test: Add Terminal UI sanity tests #9212
Workflow file for this run
This file contains hidden or 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: Lint | |
| on: | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| env: | |
| RUSTFLAGS: "-D warnings" | |
| TURBO_TELEMETRY_MESSAGE_DISABLED: "1" | |
| permissions: | |
| contents: read | |
| jobs: | |
| rust_fmt: | |
| name: Rust format | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| with: | |
| persist-credentials: false | |
| - name: Setup Rust | |
| uses: ./.github/actions/setup-rust | |
| with: | |
| github-token: "${{ secrets.GITHUB_TOKEN }}" | |
| - name: Run cargo fmt check | |
| run: cargo fmt --check | |
| rust_clippy: | |
| name: Rust clippy | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| env: | |
| CARGO_INCREMENTAL: 0 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| with: | |
| persist-credentials: false | |
| - name: Setup Environment | |
| uses: ./.github/actions/setup-environment | |
| with: | |
| github-token: "${{ secrets.GITHUB_TOKEN }}" | |
| node: "false" | |
| - name: Run cargo clippy | |
| run: cargo lint | |
| rust_licenses: | |
| name: Rust licenses | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| with: | |
| persist-credentials: false | |
| - name: Check licenses | |
| uses: EmbarkStudios/cargo-deny-action@5bb39ff5d5a0e94dc9e2dc94eced0c6129743a57 # v2 | |
| with: | |
| command: check licenses | |
| format_lint: | |
| name: Formatting | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| permissions: | |
| contents: read | |
| id-token: write | |
| env: | |
| TURBO_CACHE: ${{ github.event.pull_request.head.repo.full_name == github.repository && 'remote:rw' || 'local:rw' }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Turborepo Remote Cache | |
| if: github.event.pull_request.head.repo.full_name == github.repository | |
| uses: vercel/setup-turborepo-remote-cache-action@3df3d75a5268bbe2a4ee66048f56f3a86d6e21b7 # main | |
| with: | |
| team: ${{ vars.TURBO_TEAM }} | |
| - name: "Setup Node" | |
| uses: ./.github/actions/setup-node | |
| - name: Install Global Turbo | |
| uses: ./.github/actions/install-global-turbo | |
| - name: Lint | |
| # Manually set TURBO_API to an empty string to override Hetzner env | |
| run: | | |
| TURBO_API= turbo run quality --env-mode=strict | |
| cleanup: | |
| name: Cleanup | |
| needs: | |
| - rust_fmt | |
| - rust_clippy | |
| - rust_licenses | |
| - format_lint | |
| if: always() | |
| permissions: | |
| actions: write | |
| uses: ./.github/workflows/pr-clean-caches.yml | |
| secrets: inherit |