|
| 1 | +name: Template check |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + |
| 6 | +jobs: |
| 7 | + |
| 8 | + validate-default-instance: |
| 9 | + runs-on: ubuntu-latest |
| 10 | + container: python:3.11 |
| 11 | + permissions: |
| 12 | + contents: read |
| 13 | + pages: write |
| 14 | + |
| 15 | + steps: |
| 16 | + - uses: actions/checkout@v4 |
| 17 | + |
| 18 | + - name: Cache Dependencies |
| 19 | + uses: actions/cache@v4 |
| 20 | + with: |
| 21 | + path: ~/.cache/pip |
| 22 | + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} |
| 23 | + restore-keys: | |
| 24 | + ${{ runner.os }}-pip- |
| 25 | +
|
| 26 | + - name: Install Dependencies |
| 27 | + run: pip install -r requirements.txt |
| 28 | + |
| 29 | + - name: Create Github project instance |
| 30 | + run: cookiecutter . --no-input --config-file cookiecutter_default_gl.yaml |
| 31 | + |
| 32 | + |
| 33 | + - name: Remote checkout |
| 34 | + run: git clone git@gitlab.com:lukasz.karlowski/ds-lk-default.git ds-gl-default2 |
| 35 | + |
| 36 | + - name: Set safe directory |
| 37 | + run: | |
| 38 | + git config --global --add safe.directory /__w/ds-template/ds-template |
| 39 | +
|
| 40 | + - name: cp repo |
| 41 | + run: |
| 42 | + cp -r ds-gl-default/. ds-gl-default2 |
| 43 | + |
| 44 | + - name: ls repo |
| 45 | + run: |
| 46 | + ls -al ds-gl-default2 |
| 47 | + |
| 48 | + - name: Prepare git5 |
| 49 | + working-directory: ./ds-gl-default2 |
| 50 | + run: | |
| 51 | + git config --global user.email "lukasz.karlowski@deepsense.ai" |
| 52 | + git config --global user.name "lukasz karlowski" |
| 53 | + git checkout -b ds-default-check |
| 54 | + git add . |
| 55 | +
|
| 56 | + - name: Validate package build |
| 57 | + working-directory: ./ds-gl-default2 |
| 58 | + run: | |
| 59 | + python -m pip install . |
| 60 | +
|
| 61 | + - name: Install pre-commit |
| 62 | + run: pip3 install pre-commit |
| 63 | + |
| 64 | + - name: Run pre-commit checks |
| 65 | + working-directory: ./ds-gl-default2 |
| 66 | + run: pre-commit run --all-files --show-diff-on-failure --color always |
| 67 | + |
| 68 | + - name: Push repo |
| 69 | + working-directory: ./ds-gl-default2 |
| 70 | + run: | |
| 71 | + git commit -m "Repo after creation" |
| 72 | + git push --set-upstream origin ds-default-check |
| 73 | + |
0 commit comments