diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml deleted file mode 100644 index a7bf4e8f..00000000 --- a/.github/actions/setup/action.yml +++ /dev/null @@ -1,110 +0,0 @@ -name: setup - -inputs: - include-examples: - description: Whether to install examples - required: false - default: false - type: boolean - python-version: - description: Python version - required: false - default: '3.11' - type: string - -runs: - using: composite - steps: - - name: Get current runner - id: os-info - shell: bash - run: | - if [ "${RUNNER_OS}" = 'macOS' ]; then - echo "name=$(sw_vers -productName)" >> $GITHUB_OUTPUT - echo "version=$(sw_vers -productVersion)" >> $GITHUB_OUTPUT - elif [ "${RUNNER_OS}" = 'Linux' ]; then - echo "name=$(lsb_release -i -s)" >> $GITHUB_OUTPUT - echo "version=$(lsb_release -r -s)" >> $GITHUB_OUTPUT - else - exit 1 - fi - - - name: Set up Python ${{ inputs.python-version }} - id: setup-python - uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 - with: - python-version: ${{ inputs.python-version }} - - - name: Restore Examples installation - if: inputs.include-examples == 'true' - id: restore-examples - uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 - with: - path: venv - key: venv-${{ steps.os-info.outputs.name }}-${{ steps.os-info.outputs.version }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('setup.py') }}-${{ hashFiles( 'examples/requirements.txt') }} - restore-keys: | - venv-${{ steps.setup.outputs.os-version }}-py${{ steps.setup.outputs.python-version }}-${{ hashFiles('setup.py') }}- - - - name: Echo results - shell: bash - run: | - echo cache-hit=${{ steps.restore-examples.outputs.cache-hit }} - echo cache-primary-key=${{ steps.restore-examples.outputs.cache-primary-key }} - echo cache-matched-key=${{ steps.restore-examples.outputs.cache-matched-key }} - - - name: Restore Concordia installation - if: steps.restore-examples.outputs.cache-hit != 'true' - id: restore-concordia - uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 - with: - path: venv - key: install-concordia-${{ steps.os-info.outputs.name }}-${{ steps.os-info.outputs.version }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('setup.py') }} - restore-keys: | - install-concordia-${{ steps.os-info.outputs.name }}-${{ steps.os-info.outputs.version }}-py${{ steps.setup-python.outputs.python-version }}- - - - name: Activate venv - shell: bash - run: | - python -m venv venv - echo "${PWD}/venv/bin" >> $GITHUB_PATH - - - name: Install Concordia - if: steps.restore-examples.outputs.cache-hit != 'true' && steps.restore-concordia.outputs.cache-hit != 'true' - shell: bash - run: | - pip install --editable .[dev] - - - name: Save Concordia installation - if: steps.restore-examples.outputs.cache-hit != 'true' && steps.restore-concordia.outputs.cache-hit != 'true' - uses: actions/cache/save@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 - with: - path: venv - key: ${{ steps.restore-concordia.outputs.cache-primary-key }} - - - name: Install requirements for examples - if: inputs.include-examples == 'true' && steps.restore-examples.outputs.cache-hit != 'true' - shell: bash - run: | - pip install -r examples/requirements.txt - - - name: Save Examples installation - if: inputs.include-examples == 'true' && steps.restore-examples.outputs.cache-hit != 'true' - uses: actions/cache/save@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 - with: - path: venv - key: ${{ steps.restore-examples.outputs.cache-primary-key }} - - - name: Show installation - shell: bash - run: | - which python - python --version - which pip - pip --version - which pylint - pylint --version - which pytest - pytest --version - which pytype - pytype --version - pip list