test: added workflow to test post-install patch on fresh site #4
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Post Install Patches Tests | |
| on: | |
| workflow_call: | |
| inputs: | |
| base_ref: | |
| type: string | |
| pull_request: | |
| paths-ignore: | |
| - "**.css" | |
| - "**.js" | |
| - "**.md" | |
| - "**.html" | |
| - "**.csv" | |
| push: | |
| branches: [develop, version-14-hotfix, version-14, version-15-hotfix, version-15] | |
| paths-ignore: | |
| - "**.css" | |
| - "**.js" | |
| - "**.md" | |
| - "**.html" | |
| - "**.csv" | |
| env: | |
| BRANCH: ${{ inputs.base_ref || github.base_ref || github.ref_name }} | |
| jobs: | |
| post-install-tests: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| strategy: | |
| fail-fast: false | |
| name: Post Install Patches | |
| services: | |
| mariadb: | |
| image: mariadb:11.8 | |
| env: | |
| MARIADB_ROOT_PASSWORD: 'travis' | |
| ports: | |
| - 3306:3306 | |
| options: --health-cmd="mariadb-admin ping" --health-interval=5s --health-timeout=2s --health-retries=3 | |
| steps: | |
| - name: Clone | |
| uses: actions/checkout@v6 | |
| - name: Setup Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.14" | |
| - name: Setup Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| check-latest: true | |
| - name: Add to Hosts | |
| run: echo "127.0.0.1 test_site" | sudo tee -a /etc/hosts | |
| - name: Cache pip | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ hashFiles('**/*requirements.txt') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip- | |
| ${{ runner.os }}- | |
| - name: Cache node modules | |
| uses: actions/cache@v5 | |
| env: | |
| cache-name: cache-node-modules | |
| with: | |
| path: ~/.npm | |
| key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-build-${{ env.cache-name }}- | |
| ${{ runner.os }}-build- | |
| ${{ runner.os }}- | |
| - name: Get yarn cache directory path | |
| id: yarn-cache-dir-path | |
| run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | |
| - uses: actions/cache@v5 | |
| id: yarn-cache | |
| with: | |
| path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
| key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-yarn- | |
| - name: Install with Post Install Patches | |
| run: | | |
| bash ${GITHUB_WORKSPACE}/.github/helper/post_install.sh | |
| env: | |
| BRANCH_TO_CLONE: ${{ env.BRANCH }} | |
| - name: Show bench output | |
| if: ${{ always() }} | |
| run: cat ~/frappe-bench/bench_start.log || true |