|
| 1 | +name: Install dependencies on Linux |
| 2 | +description: Install dependencies on Linux |
| 3 | +inputs: |
| 4 | + python-version: |
| 5 | + description: "Python version to install" |
| 6 | + required: false |
| 7 | + default: "3.9" |
| 8 | +runs: |
| 9 | + using: "composite" |
| 10 | + steps: |
| 11 | + - uses: actions/checkout@v3.5.0 |
| 12 | + with: |
| 13 | + fetch-depth: 0 |
| 14 | + - name: Checkout repository |
| 15 | + shell: bash |
| 16 | + run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* |
| 17 | + - name: Set up Python ${{ inputs.python-version }} |
| 18 | + uses: actions/setup-python@v4 |
| 19 | + with: |
| 20 | + python-version: ${{ inputs.python-version }} |
| 21 | + - name: Install system packages |
| 22 | + shell: bash |
| 23 | + run: | |
| 24 | + sudo apt-get update -y |
| 25 | + sudo apt-get install -y libyaml-0-2 libyaml-dev unzip fuse3 |
| 26 | + sudo -v ; curl https://rclone.org/install.sh | sudo bash |
| 27 | + - uses: actions/cache@master |
| 28 | + id: dependency-cache |
| 29 | + with: |
| 30 | + path: | |
| 31 | + ${{ env.pythonLocation }} |
| 32 | + renku/templates |
| 33 | + key: ${{ env.DEPENDENCY_CACHE_PREFIX }}-${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('poetry.lock') }}-${{ hashFiles('Makefile') }} |
| 34 | + env: |
| 35 | + DEPENDENCY_CACHE_PREFIX: "v1" |
| 36 | + - name: Install dependencies |
| 37 | + if: steps.dependency-cache.outputs.cache-hit != 'true' || 'refs/heads/master' == github.ref || 'refs/heads/develop' == github.ref || startsWith(github.ref, 'refs/tags/') |
| 38 | + env: |
| 39 | + POETRY_VIRTUALENVS_CREATE: "false" |
| 40 | + shell: bash |
| 41 | + run: | |
| 42 | + python -m pip install --upgrade pip |
| 43 | + python -m pip install coveralls poetry wheel twine |
| 44 | + poetry self add "poetry-dynamic-versioning[plugin]" |
| 45 | + make download-templates |
| 46 | + poetry install -E service --with dev,tests,docs |
| 47 | + - name: Install renku into cache |
| 48 | + if: steps.dependency-cache.outputs.cache-hit == 'true' |
| 49 | + env: |
| 50 | + POETRY_VIRTUALENVS_CREATE: "false" |
| 51 | + shell: bash |
| 52 | + run: | |
| 53 | + poetry install -E service --with dev,tests,docs |
| 54 | + - name: Set Git config |
| 55 | + shell: bash |
| 56 | + run: | |
| 57 | + git config --global --add user.name "Renku Bot" |
| 58 | + git config --global --add user.email "renku@datascience.ch" |
| 59 | + - id: year-week |
| 60 | + shell: bash |
| 61 | + run: echo "date=$(date '+%Y-%V')" >> $GITHUB_OUTPUT |
| 62 | + - name: Network cache |
| 63 | + uses: actions/cache@master |
| 64 | + with: |
| 65 | + path: cassettes |
| 66 | + key: ${{ env.NETWORK_CACHE_PREFIX }}-${{ steps.year-week.outputs.date }}-${{ hashFiles('poetry.lock') }}-${{ github.job }} |
| 67 | + env: |
| 68 | + NETWORK_CACHE_PREFIX: "v1" |
| 69 | + - name: Set coveralls path mapping |
| 70 | + shell: bash |
| 71 | + run: | |
| 72 | + echo " |
| 73 | +
|
| 74 | + [tool.coverage.paths] |
| 75 | + source = [ |
| 76 | + \"renku/\", |
| 77 | + \"$(python -c 'import sysconfig; print(sysconfig.get_paths()["purelib"])')/renku/\" |
| 78 | + ]" >> pyproject.toml |
0 commit comments