fix(sidebar): render nested subpages as details #750
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: Test | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }} | |
| cancel-in-progress: true | |
| permissions: {} # No GITHUB_TOKEN permissions, as we only use it to increase API limit. | |
| env: | |
| CONTENT_ROOT: ${{ github.workspace }}/content/files | |
| CONTENT_TRANSLATED_ROOT: ${{ github.workspace }}/translated-content/files | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| rari-binary-artifact-id: ${{ steps.upload.outputs.artifact-id }} | |
| env: | |
| RUSTC_WRAPPER: sccache | |
| SCCACHE_GHA_ENABLED: true | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - uses: dtolnay/rust-toolchain@9a1d20035bdbcbc899baabe1e402e85bc33639bc # 1.90 | |
| - name: sccache-cache | |
| uses: mozilla-actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9 | |
| - name: Build | |
| run: cargo build --release --verbose | |
| - name: Upload binary | |
| id: upload | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: rari-binary | |
| path: target/release/rari | |
| retention-days: 1 | |
| format: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - uses: dtolnay/rust-toolchain@9a1d20035bdbcbc899baabe1e402e85bc33639bc # 1.90 | |
| with: | |
| components: rustfmt | |
| - name: Run fmt | |
| run: cargo fmt -- --check | |
| test: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| env: | |
| RUSTC_WRAPPER: sccache | |
| SCCACHE_GHA_ENABLED: true | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - uses: dtolnay/rust-toolchain@9a1d20035bdbcbc899baabe1e402e85bc33639bc # 1.90 | |
| - name: sccache-cache | |
| uses: mozilla-actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9 | |
| - name: Run tests | |
| run: cargo test --verbose --workspace --all-targets --no-fail-fast | |
| - name: Run doc tests | |
| run: cargo test --verbose --workspace --doc --features doctest --no-fail-fast | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - uses: dtolnay/rust-toolchain@9a1d20035bdbcbc899baabe1e402e85bc33639bc # 1.90 | |
| with: | |
| components: clippy | |
| - name: Run clippy | |
| run: cargo clippy --all-features --workspace -- -Dwarnings | |
| content: | |
| if: github.event_name == 'pull_request' | |
| needs: build | |
| uses: ./.github/workflows/_test-content.yml | |
| with: | |
| rari-binary-artifact-id: ${{ needs.build.outputs.rari-binary-artifact-id }} | |
| pr-review: | |
| if: github.event_name == 'pull_request' | |
| needs: build | |
| permissions: | |
| contents: read | |
| id-token: write | |
| pull-requests: write | |
| secrets: inherit | |
| uses: ./.github/workflows/pr-review-companion.yml | |
| with: | |
| rari-binary-artifact-id: ${{ needs.build.outputs.rari-binary-artifact-id }} |