Skip to content

Delegate conditional checkout to external action #1

Delegate conditional checkout to external action

Delegate conditional checkout to external action #1

Workflow file for this run

name: Build & test plugin
on:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Setup enviroment
uses: scipion-chem/.github/.github/composites/install-scipion@main
- name: Clone scipion-chem (in branch ${{ github.head_ref }} if exists, then tries ${{ github.base_ref }}, finally, default branch)
uses: scipion-chem/.github/.github/composites/clone-in-branch@main
with:
path: ${{ github.workspace }}/../
repo_url: https://github.com/scipion-chem/scipion-chem
prioritized_branches: "${{ github.head_ref }},${{ github.base_ref }}"
- name: Install scipion-chem
working-directory: ${{ github.workspace }}/../
run: scipion/scipion3 installp -p scipion-chem/ --devel
- name: Checkout repository
uses: actions/checkout@main
with:
ref: ${{ github.head_ref }}
- name: Install plugin from pull request
working-directory: ${{ github.workspace }}
run: ../scipion/scipion3 installp -p . --devel
- name: Run tests
working-directory: ${{ github.workspace }}/../
env:
TEST_MODULE: ${{ vars.FOLDER_WITH_VERSION }}
run: |
pip install --user scipion-testrunner
scipion_testrunner ./scipion/scipion3 $TEST_MODULE --noGpu --testData=${{ github.workspace }}/$TEST_MODULE/testData.json