| on: [pull_request, workflow_dispatch] |
| MYSQL_ALLOW_EMPTY_PASSWORD: YES |
| options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3 |
| uses: actions/checkout@v2 |
| uses: actions/setup-python@v2 |
| run: echo "127.0.0.1 test_site" | sudo tee -a /etc/hosts |
| key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} |
| - name: Cache node modules |
| cache-name: cache-node-modules |
| key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} |
| ${{ runner.os }}-build-${{ env.cache-name }}- |
| - name: Get yarn cache directory path |
| run: echo "::set-output name=dir::$(yarn cache dir)" |
| path: ${{ steps.yarn-cache-dir-path.outputs.dir }} |
| key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} |
| run: bash ${GITHUB_WORKSPACE}/.github/helper/install.sh |
| run: cd ~/frappe-bench/ && wget http://build.erpnext.com/20171108_190013_955977f8_database.sql.gz && bench --site test_site --force restore ~/frappe-bench/20171108_190013_955977f8_database.sql.gz && bench --site test_site migrate |