| 
 | 1 | +name: Cross compatibility  | 
 | 2 | + | 
 | 3 | +on:  | 
 | 4 | +  workflow_dispatch:  | 
 | 5 | +    inputs:  | 
 | 6 | +      r_pins_tag:  | 
 | 7 | +        description: "Tag or commit from pins-r (e.g. v1.0.3)"  | 
 | 8 | +        default: "__cran__"  | 
 | 9 | +        required: true  | 
 | 10 | +  push:  | 
 | 11 | +    branches: ['main', 'dev-*']  | 
 | 12 | +  pull_request:  | 
 | 13 | +  release:  | 
 | 14 | +    types: [published]  | 
 | 15 | + | 
 | 16 | +env:  | 
 | 17 | +  PINS_ALLOW_RSC_SHORT_NAME: 1  | 
 | 18 | +  PINS_FEATURE_PREVIEW: 1  | 
 | 19 | + | 
 | 20 | +jobs:  | 
 | 21 | +  check-cross-compatibility:  | 
 | 22 | +    name: "Check cross lib compatibility"  | 
 | 23 | +    runs-on: ubuntu-latest  | 
 | 24 | +    steps:  | 
 | 25 | +    - uses: actions/checkout@v2  | 
 | 26 | + | 
 | 27 | +    - name: Install libcurl on Linux  | 
 | 28 | +      run: sudo apt-get update -y && sudo apt-get install -y libcurl4-openssl-dev  | 
 | 29 | + | 
 | 30 | +    # r ---  | 
 | 31 | + | 
 | 32 | +    - uses: r-lib/actions/setup-r@v2  | 
 | 33 | +      with:  | 
 | 34 | +        use-public-rspm: true  | 
 | 35 | + | 
 | 36 | +    - name: Install R dependencies (from CRAN)  | 
 | 37 | +      run: "install.packages('pins')"  | 
 | 38 | +      shell: Rscript {0}  | 
 | 39 | +      if: ${{ github.event.name != 'workflow_dispatch' || inputs.r_pins_tag == '__cran__' }}  | 
 | 40 | + | 
 | 41 | +    - name: Install R dependencies (from github)  | 
 | 42 | +      run: |  | 
 | 43 | +        install.packages("remotes")  | 
 | 44 | +        remotes::install_github(paste0('rstudio/pins-r@', Sys.getenv('R_PINS_TAG')))  | 
 | 45 | +      shell: Rscript {0}  | 
 | 46 | +      env:  | 
 | 47 | +        R_PINS_TAG: ${{ inputs.r_pins_tag }}  | 
 | 48 | +        GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}  | 
 | 49 | +      if: ${{ github.event.name == 'workflow_dispatch' && inputs.r_pins_tag != '__cran__' }}  | 
 | 50 | + | 
 | 51 | +    # python ---  | 
 | 52 | + | 
 | 53 | +    - uses: actions/setup-python@v2  | 
 | 54 | +      with:  | 
 | 55 | +        python-version: 3.8  | 
 | 56 | +    - name: Install py dependencies  | 
 | 57 | +      run: |  | 
 | 58 | +        python -m pip install --upgrade pip  | 
 | 59 | +        python -m pip install -r requirements/dev.txt  | 
 | 60 | +        python -m pip install -e .  | 
 | 61 | +
  | 
 | 62 | +    # write and test ---  | 
 | 63 | + | 
 | 64 | +    - name: Run script/ci-compat-check  | 
 | 65 | +      run: make ci-compat-check  | 
0 commit comments