diff --git a/.github/actions/install-project/action.yml b/.github/actions/install-project/action.yml deleted file mode 100644 index d42a612d..00000000 --- a/.github/actions/install-project/action.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: Install Project -description: Install Snakebids and its dependencies -inputs: - python-version: - required: true - description: Python version to install - poetry-cache-id: - default: ${{ github.event.pull_request.id || github.event.after }} - description: > - Reference ID to use for defining poetry cache (e.g. pull request id - or commit SHA) - -runs: - using: composite - steps: - # install & configure poetry - - name: Cache Poetry Installation - id: cached-poetry - uses: actions/cache@v3 - with: - path: ~/.local - key: ${{ runner.os }}-poetry-${{ inputs.poetry-cache-id }} - - name: Install Poetry - uses: snok/install-poetry@v1 - if: steps.cached-poetry.outputs.cache-hit != 'true' - with: - virtualenvs-create: true - virtualenvs-in-project: true - - - name: Setup Python - id: setup-python - uses: actions/setup-python@v4 - with: - python-version: ${{ inputs.python-version }} - cache: 'poetry' - - name: Store Pip Cache - uses: actions/cache@v3 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ steps.setup-python.outputs.python-version }} - restore-keys: ${{ runner.os }}-pip-${{ steps.setup-python.outputs.python-version }} - - # install dependencies - - name: Install dependencies - shell: bash - if: steps.setup-python.outputs.cache-hit != 'true' - run: poetry install --no-interaction --no-ansi --no-root - - name: Install library - shell: bash - run: poetry install --no-interaction --no-ansi diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9d4ca831..f738b7fd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,12 +18,11 @@ jobs: runs-on: ubuntu-latest steps: - - name: Clone repo - uses: actions/checkout@v3 - name: Install - uses: ./.github/actions/install-project + uses: khanlab/actions/.github/actions/action-setup_task-installPyProject with: python-version: '3.11' + install-library: true # run python style checks - name: Poetry Lock Check @@ -59,12 +58,11 @@ jobs: split: ['1', '2', '3', '4', '5'] fail-fast: false steps: - - name: Clone repo - uses: actions/checkout@v3 - name: install - uses: ./.github/actions/install-project + uses: khanlab/actions/.github/actions/action-setup_task-installPyProject with: python-version: ${{ matrix.python-version }} + install-library: true - name: Test with pytest env: