From b6b1ce0c31f3ef0e8fdea231bd15fc33134ec4b8 Mon Sep 17 00:00:00 2001 From: Rohan Bansal Date: Mon, 6 May 2024 12:10:53 +0530 Subject: [PATCH] ci: run redis server --- .github/helper/install.sh | 2 +- .github/workflows/pytest.yaml | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/helper/install.sh b/.github/helper/install.sh index 30d0d12..8990865 100644 --- a/.github/helper/install.sh +++ b/.github/helper/install.sh @@ -10,7 +10,7 @@ sudo apt install libcups2-dev redis-server mariadb-client-10.6 pip install frappe-bench -bench init --skip-redis-config-generation --skip-assets --python "$(which python)" --frappe-branch version-15 frappe-bench +bench init --skip-assets --python "$(which python)" --frappe-branch version-15 frappe-bench mkdir ~/frappe-bench/sites/test_site cp -r "${GITHUB_WORKSPACE}/.github/helper/site_config.json" ~/frappe-bench/sites/test_site/ diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index 9f30e89..683b29d 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -50,15 +50,16 @@ jobs: with: node-version: 18 check-latest: true + cache: 'yarn' - name: Add to Hosts run: echo "127.0.0.1 test_site" | sudo tee -a /etc/hosts - name: Cache pip - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('**/*requirements.txt', '**/pyproject.toml', '**/setup.py') }} + key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml') }} restore-keys: | ${{ runner.os }}-pip- ${{ runner.os }}- @@ -67,7 +68,7 @@ jobs: id: yarn-cache-dir-path run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v3 + - uses: actions/cache@v4 id: yarn-cache with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} @@ -83,6 +84,6 @@ jobs: working-directory: /home/runner/frappe-bench run: | source env/bin/activate - pytest ./apps/cloud_storage/cloud_storage/tests/ --disable-warnings -s + pytest ./apps/cloud_storage/cloud_storage/tests/ -s env: - TYPE: server \ No newline at end of file + TYPE: server