fix: update SIDISH document #131
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
| # This workflow uses actions that are not certified by GitHub. | |
| # They are provided by a third-party and are governed by | |
| # separate terms of service, privacy policy, and support | |
| # documentation. | |
| # | |
| # See https://github.com/r-lib/actions/tree/master/examples#readme for | |
| # additional example workflows available for the R community. | |
| # ======================================================== # | |
| # Determines when the action is triggered # | |
| # ======================================================== # | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - master | |
| pull_request: | |
| branches: | |
| - main | |
| - master | |
| # 添加手动触发器 | |
| workflow_dispatch: | |
| inputs: | |
| os_selection: | |
| description: "Operating system to test" | |
| required: false | |
| type: choice | |
| options: | |
| - "all" | |
| - "ubuntu-latest" | |
| - "windows-latest" | |
| - "macOS-latest" | |
| default: "all" | |
| r_version: | |
| description: "R version to test" | |
| required: false | |
| type: choice | |
| options: | |
| - "release" | |
| - "devel" | |
| - "oldrel-1" | |
| default: "release" | |
| run_examples: | |
| description: "Run package examples" | |
| required: false | |
| type: boolean | |
| default: true | |
| run_tests: | |
| description: "Run package tests" | |
| required: false | |
| type: boolean | |
| default: true | |
| name: R-CMD-check | |
| # ======================================================== # | |
| # Determine actions to take # | |
| # ======================================================== # | |
| jobs: | |
| # 动态配置矩阵 | |
| setup-matrix: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| matrix: ${{ steps.set-matrix.outputs.matrix }} | |
| steps: | |
| - name: Set up test matrix | |
| id: set-matrix | |
| run: | | |
| if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then | |
| OS="${{ inputs.os_selection }}" | |
| R_VERSION="${{ inputs.r_version }}" | |
| if [ "$OS" = "all" ]; then | |
| echo 'matrix={"os":["ubuntu-latest","windows-latest","macOS-latest"],"r":["'"$R_VERSION"'"]}' >> $GITHUB_OUTPUT | |
| else | |
| echo 'matrix={"os":["'"$OS"'"],"r":["'"$R_VERSION"'"]}' >> $GITHUB_OUTPUT | |
| fi | |
| else | |
| # 默认配置(push/PR 触发) | |
| echo 'matrix={"os":["ubuntu-latest","windows-latest","macOS-latest"],"r":["release"]}' >> $GITHUB_OUTPUT | |
| fi | |
| R-CMD-check: | |
| needs: setup-matrix | |
| runs-on: ${{ matrix.os }} | |
| name: ${{ matrix.os }} (R ${{ matrix.r }}) | |
| defaults: | |
| run: | |
| shell: bash | |
| strategy: | |
| fail-fast: false | |
| matrix: ${{ fromJson(needs.setup-matrix.outputs.matrix) }} | |
| env: | |
| GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
| R_KEEP_PKG_SOURCE: yes | |
| steps: | |
| - name: Display trigger information | |
| run: | | |
| echo "Triggered by: ${{ github.event_name }}" | |
| if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then | |
| echo "OS selection: ${{ inputs.os_selection }}" | |
| echo "R version: ${{ inputs.r_version }}" | |
| echo "Run examples: ${{ inputs.run_examples }}" | |
| echo "Run tests: ${{ inputs.run_tests }}" | |
| fi | |
| - name: Checking out the repository | |
| uses: actions/checkout@v4 | |
| - name: Setting up pandoc | |
| uses: r-lib/actions/setup-pandoc@v2 | |
| - name: Setting up R ${{ matrix.r }} on ${{ matrix.os }} | |
| uses: r-lib/actions/setup-r@v2 | |
| with: | |
| r-version: ${{ matrix.r }} | |
| use-public-rspm: true | |
| - name: Installing R dependencies | |
| uses: r-lib/actions/setup-r-dependencies@v2 | |
| with: | |
| extra-packages: | | |
| any::rcmdcheck | |
| any::remotes | |
| github::Exceret/ScPP | |
| github::ShixiangWang/IDConverter | |
| github::Exceret/scAB | |
| github::Exceret/Scissor | |
| github::Exceret/scPAS | |
| github::Exceret/SigBridgeRUtils | |
| github::Exceret/DEGAS | |
| github::Exceret/PIPET | |
| github::Exceret/LPSGL | |
| dependencies: '"all"' | |
| needs: check | |
| - name: Running R CMD check | |
| uses: r-lib/actions/check-r-package@v2 | |
| with: | |
| upload-snapshots: true | |
| build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")' | |
| args: 'c("--no-manual", "--as-cran")' | |
| error-on: '"warning"' |