From a131a3673a41ac9731715d3003211fa5dd8caf35 Mon Sep 17 00:00:00 2001 From: David Date: Sun, 13 Oct 2024 02:26:05 +0200 Subject: [PATCH] ci: remove all other workflows --- .github/workflows/backport.yml | 26 --- .github/workflows/docker-release.yml | 14 -- .github/workflows/docs-checker.yml | 25 --- .github/workflows/generate-pot-file.yml | 39 ----- .github/workflows/initiate_release.yml | 32 ---- .github/workflows/labeller.yml | 12 -- .github/workflows/linters.yml | 42 ----- .github/workflows/lock.yml | 21 --- .github/workflows/patch.yml | 160 ------------------ .github/workflows/patch_faux.yml | 22 --- .github/workflows/release.yml | 31 ---- .github/workflows/release_notes.yml | 42 ----- .github/workflows/semantic-commits.yml | 30 ---- .../workflows/server-tests-mariadb-faux.yml | 24 --- .github/workflows/server-tests-mariadb.yml | 158 ----------------- .github/workflows/server-tests-postgres.yml | 112 ------------ 16 files changed, 790 deletions(-) delete mode 100644 .github/workflows/backport.yml delete mode 100644 .github/workflows/docker-release.yml delete mode 100644 .github/workflows/docs-checker.yml delete mode 100644 .github/workflows/generate-pot-file.yml delete mode 100644 .github/workflows/initiate_release.yml delete mode 100644 .github/workflows/labeller.yml delete mode 100644 .github/workflows/linters.yml delete mode 100644 .github/workflows/lock.yml delete mode 100644 .github/workflows/patch.yml delete mode 100644 .github/workflows/patch_faux.yml delete mode 100644 .github/workflows/release.yml delete mode 100644 .github/workflows/release_notes.yml delete mode 100644 .github/workflows/semantic-commits.yml delete mode 100644 .github/workflows/server-tests-mariadb-faux.yml delete mode 100644 .github/workflows/server-tests-mariadb.yml delete mode 100644 .github/workflows/server-tests-postgres.yml diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml deleted file mode 100644 index 3c5ad071dcaf..000000000000 --- a/.github/workflows/backport.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Backport -on: - pull_request_target: - types: - - closed - - labeled - -jobs: - main: - runs-on: ubuntu-latest - timeout-minutes: 60 - steps: - - name: Checkout Actions - uses: actions/checkout@v2 - with: - repository: "frappe/backport" - path: ./actions - ref: develop - - name: Install Actions - run: npm install --production --prefix ./actions - - name: Run backport - uses: ./actions/backport - with: - token: ${{secrets.RELEASE_TOKEN}} - labelsToAdd: "backport" - title: "{{originalTitle}}" diff --git a/.github/workflows/docker-release.yml b/.github/workflows/docker-release.yml deleted file mode 100644 index 5b607a994061..000000000000 --- a/.github/workflows/docker-release.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: Trigger Docker build on release -on: - release: - types: [released] -jobs: - curl: - runs-on: ubuntu-latest - container: - image: alpine:latest - steps: - - name: curl - run: | - apk add curl bash - curl -X POST -H "Accept: application/vnd.github.v3+json" -H "Authorization: Bearer ${{ secrets.CI_PAT }}" https://api.github.com/repos/frappe/frappe_docker/actions/workflows/build_stable.yml/dispatches -d '{"ref":"main"}' diff --git a/.github/workflows/docs-checker.yml b/.github/workflows/docs-checker.yml deleted file mode 100644 index 722c1252ed9a..000000000000 --- a/.github/workflows/docs-checker.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: 'Documentation Required' -on: - pull_request: - types: [ opened, synchronize, reopened, edited ] - -jobs: - build: - runs-on: ubuntu-latest - timeout-minutes: 10 - - steps: - - name: 'Setup Environment' - uses: actions/setup-python@v2 - with: - python-version: '3.10' - - - name: 'Clone repo' - uses: actions/checkout@v2 - - - name: Validate Docs - env: - PR_NUMBER: ${{ github.event.number }} - run: | - pip install requests --quiet - python $GITHUB_WORKSPACE/.github/helper/documentation.py $PR_NUMBER diff --git a/.github/workflows/generate-pot-file.yml b/.github/workflows/generate-pot-file.yml deleted file mode 100644 index 9e42f4e04392..000000000000 --- a/.github/workflows/generate-pot-file.yml +++ /dev/null @@ -1,39 +0,0 @@ -# This workflow is agnostic to branches. Only maintain on develop branch. -# To add/remove branches just modify the matrix. - -name: Regenerate POT file (translatable strings) -on: - schedule: - # 9:30 UTC => 3 PM IST Sunday - - cron: "30 9 * * 0" - workflow_dispatch: - -jobs: - regenerate-pot-file: - name: Regenerate POT file - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - branch: ["develop"] - permissions: - contents: write - - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - ref: ${{ matrix.branch }} - - - name: Setup Python - uses: actions/setup-python@v5 - with: - python-version: "3.12" - - - name: Run script to update POT file - run: | - bash ${GITHUB_WORKSPACE}/.github/helper/update_pot_file.sh - env: - GH_TOKEN: ${{ secrets.RELEASE_TOKEN }} - BASE_BRANCH: ${{ matrix.branch }} - PR_REVIEWER: barredterra # change to your GitHub username if you copied this file diff --git a/.github/workflows/initiate_release.yml b/.github/workflows/initiate_release.yml deleted file mode 100644 index 321d6f5b403c..000000000000 --- a/.github/workflows/initiate_release.yml +++ /dev/null @@ -1,32 +0,0 @@ -# This workflow is agnostic to branches. Only maintain on develop branch. -# To add/remove versions just modify the matrix. - -name: Create weekly release pull requests -on: - schedule: - # 9:30 UTC => 3 PM IST Tuesday - - cron: "30 9 * * 2" - workflow_dispatch: - -jobs: - stable-release: - name: Release - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - version: ["14", "15"] - - steps: - - uses: octokit/request-action@v2.x - with: - route: POST /repos/{owner}/{repo}/pulls - owner: frappe - repo: erpnext - title: |- - "chore: release v${{ matrix.version }}" - body: "Automated weekly release." - base: version-${{ matrix.version }} - head: version-${{ matrix.version }}-hotfix - env: - GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} diff --git a/.github/workflows/labeller.yml b/.github/workflows/labeller.yml deleted file mode 100644 index a7744006117d..000000000000 --- a/.github/workflows/labeller.yml +++ /dev/null @@ -1,12 +0,0 @@ -name: "Pull Request Labeler" -on: - pull_request_target: - types: [opened, reopened] - -jobs: - triage: - runs-on: ubuntu-latest - steps: - - uses: actions/labeler@v3 - with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml deleted file mode 100644 index c7caa4cbab2a..000000000000 --- a/.github/workflows/linters.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: Linters - -on: - pull_request: { } - -jobs: - - linters: - name: linters - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: Set up Python 3.10 - uses: actions/setup-python@v4 - with: - python-version: '3.10' - cache: pip - - - name: Install and Run Pre-commit - uses: pre-commit/action@v3.0.0 - - semgrep: - name: semgrep - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: Set up Python 3.10 - uses: actions/setup-python@v4 - with: - python-version: '3.10' - cache: pip - - - name: Download Semgrep rules - run: git clone --depth 1 https://github.com/frappe/semgrep-rules.git frappe-semgrep-rules - - - name: Download semgrep - run: pip install semgrep - - - name: Run Semgrep rules - run: semgrep ci --config ./frappe-semgrep-rules/rules --config r/python.lang.correctness diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml deleted file mode 100644 index e990228185e1..000000000000 --- a/.github/workflows/lock.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: 'Lock threads' - -on: - schedule: - - cron: '0 0 * * *' - workflow_dispatch: - -permissions: - issues: write - pull-requests: write - - -jobs: - lock: - runs-on: ubuntu-latest - steps: - - uses: dessant/lock-threads@v5 - with: - github-token: ${{ github.token }} - issue-inactive-days: 14 - pr-inactive-days: 14 diff --git a/.github/workflows/patch.yml b/.github/workflows/patch.yml deleted file mode 100644 index deca0073b895..000000000000 --- a/.github/workflows/patch.yml +++ /dev/null @@ -1,160 +0,0 @@ -name: Patch - -on: - pull_request: - paths-ignore: - - '**.js' - - '**.css' - - '**.md' - - '**.html' - - '**.csv' - workflow_dispatch: - -concurrency: - group: patch-develop-${{ github.event_name }}-${{ github.event.number || github.event_name == 'workflow_dispatch' && github.run_id || '' }} - cancel-in-progress: true - -jobs: - test: - runs-on: ubuntu-latest - timeout-minutes: 60 - - name: Patch Test - - services: - mysql: - image: mariadb:10.6 - env: - MARIADB_ROOT_PASSWORD: 'root' - ports: - - 3306:3306 - options: --health-cmd="mariadb-admin ping" --health-interval=5s --health-timeout=2s --health-retries=3 - - steps: - - name: Clone - uses: actions/checkout@v4 - - - name: Check for valid Python & Merge Conflicts - run: | - python -m compileall -f "${GITHUB_WORKSPACE}" - if grep -lr --exclude-dir=node_modules "^<<<<<<< " "${GITHUB_WORKSPACE}" - then echo "Found merge conflicts" - exit 1 - fi - - - name: Setup Python - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - - name: Setup Node - uses: actions/setup-node@v4 - with: - node-version: 18 - 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@v4 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('**/*requirements.txt', '**/pyproject.toml') }} - restore-keys: | - ${{ runner.os }}-pip- - ${{ runner.os }}- - - - name: Cache node modules - uses: actions/cache@v4 - 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 "::set-output name=dir::$(yarn cache dir)" - - - uses: actions/cache@v4 - 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 - run: | - pip install frappe-bench - bash ${GITHUB_WORKSPACE}/.github/helper/install.sh - env: - DB: mariadb - TYPE: server - - - name: Run Patch Tests - run: | - cd ~/frappe-bench/ - bench remove-app payments --force - jq 'del(.install_apps)' ~/frappe-bench/sites/test_site/site_config.json > tmp.json - mv tmp.json ~/frappe-bench/sites/test_site/site_config.json - - wget https://erpnext.com/files/v13-erpnext.sql.gz - bench --site test_site --force restore ~/frappe-bench/v13-erpnext.sql.gz - - git -C "apps/frappe" remote set-url upstream https://github.com/frappe/frappe.git - git -C "apps/erpnext" remote set-url upstream https://github.com/frappe/erpnext.git - - - function update_to_version() { - version=$1 - - branch_name="version-$version-hotfix" - echo "Updating to v$version" - - # Fetch and checkout branches - git -C "apps/frappe" fetch --depth 1 upstream $branch_name:$branch_name - git -C "apps/erpnext" fetch --depth 1 upstream $branch_name:$branch_name - git -C "apps/frappe" checkout -q -f $branch_name - git -C "apps/erpnext" checkout -q -f $branch_name - - # Resetup env and install apps - pgrep honcho | xargs kill - rm -rf ~/frappe-bench/env - bench -v setup env - bench pip install -e ./apps/erpnext - bench start &>> ~/frappe-bench/bench_start.log & - - bench --site test_site migrate - } - - update_to_version 14 - update_to_version 15 - - echo "Updating to latest version" - git -C "apps/frappe" checkout -q -f "${GITHUB_BASE_REF:-${GITHUB_REF##*/}}" - git -C "apps/erpnext" checkout -q -f "$GITHUB_SHA" - - pgrep honcho | xargs kill - rm -rf ~/frappe-bench/env - bench -v setup env - bench pip install -e ./apps/erpnext - bench start &>> ~/frappe-bench/bench_start.log & - - bench --site test_site migrate - - - name: Show bench output - if: ${{ always() }} - run: | - cd ~/frappe-bench - cat bench_start.log || true - cd logs - for f in ./*.log*; do - echo "Printing log: $f"; - cat $f - done diff --git a/.github/workflows/patch_faux.yml b/.github/workflows/patch_faux.yml deleted file mode 100644 index 93d88bdd991f..000000000000 --- a/.github/workflows/patch_faux.yml +++ /dev/null @@ -1,22 +0,0 @@ -# Tests are skipped for these files but github doesn't allow "passing" hence this is required. - -name: Skipped Patch Test - -on: - pull_request: - paths: - - "**.js" - - "**.css" - - "**.md" - - "**.html" - - "**.csv" - -jobs: - test: - runs-on: ubuntu-latest - - name: Patch Test - - steps: - - name: Pass skipped tests unconditionally - run: "echo Skipped" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 93b17323681c..000000000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Generate Semantic Release -on: - push: - branches: - - version-13 -jobs: - release: - name: Release - runs-on: ubuntu-latest - steps: - - name: Checkout Entire Repository - uses: actions/checkout@v2 - with: - fetch-depth: 0 - persist-credentials: false - - name: Setup Node.js - uses: actions/setup-node@v2 - with: - node-version: 20 - - name: Setup dependencies - run: | - npm install @semantic-release/git @semantic-release/exec --no-save - - name: Create Release - env: - GH_TOKEN: ${{ secrets.RELEASE_TOKEN }} - GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} - GIT_AUTHOR_NAME: "Frappe PR Bot" - GIT_AUTHOR_EMAIL: "developers@frappe.io" - GIT_COMMITTER_NAME: "Frappe PR Bot" - GIT_COMMITTER_EMAIL: "developers@frappe.io" - run: npx semantic-release diff --git a/.github/workflows/release_notes.yml b/.github/workflows/release_notes.yml deleted file mode 100644 index 90621be132d1..000000000000 --- a/.github/workflows/release_notes.yml +++ /dev/null @@ -1,42 +0,0 @@ -# This action: -# -# 1. Generates release notes using github API. -# 2. Strips unnecessary info like chore/style etc from notes. -# 3. Updates release info. - -# This action needs to be maintained on all branches that do releases. - -name: 'Release Notes' - -on: - workflow_dispatch: - inputs: - tag_name: - description: 'Tag of release like v13.0.0' - required: true - type: string - release: - types: [released] - -permissions: - contents: read - -jobs: - regen-notes: - name: 'Regenerate release notes' - runs-on: ubuntu-latest - - steps: - - name: Update notes - run: | - NEW_NOTES=$(gh api --method POST -H "Accept: application/vnd.github+json" /repos/frappe/erpnext/releases/generate-notes -f tag_name=$RELEASE_TAG \ - | jq -r '.body' \ - | sed -E '/^\* (chore|ci|test|docs|style)/d' \ - | sed -E 's/by @mergify //' - ) - RELEASE_ID=$(gh api -H "Accept: application/vnd.github+json" /repos/frappe/erpnext/releases/tags/$RELEASE_TAG | jq -r '.id') - gh api --method PATCH -H "Accept: application/vnd.github+json" /repos/frappe/erpnext/releases/$RELEASE_ID -f body="$NEW_NOTES" - - env: - GH_TOKEN: ${{ secrets.RELEASE_TOKEN }} - RELEASE_TAG: ${{ github.event.inputs.tag_name || github.event.release.tag_name }} diff --git a/.github/workflows/semantic-commits.yml b/.github/workflows/semantic-commits.yml deleted file mode 100644 index 0e478d551d9e..000000000000 --- a/.github/workflows/semantic-commits.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Semantic Commits - -on: - pull_request: {} - -permissions: - contents: read - -concurrency: - group: commitcheck-erpnext-${{ github.event.number }} - cancel-in-progress: true - -jobs: - commitlint: - name: Check Commit Titles - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 200 - - - uses: actions/setup-node@v3 - with: - node-version: 18 - check-latest: true - - - name: Check commit titles - run: | - npm install @commitlint/cli @commitlint/config-conventional - npx commitlint --verbose --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} diff --git a/.github/workflows/server-tests-mariadb-faux.yml b/.github/workflows/server-tests-mariadb-faux.yml deleted file mode 100644 index 8334661cb0c2..000000000000 --- a/.github/workflows/server-tests-mariadb-faux.yml +++ /dev/null @@ -1,24 +0,0 @@ -# Tests are skipped for these files but github doesn't allow "passing" hence this is required. - -name: Skipped Tests - -on: - pull_request: - paths: - - "**.js" - - "**.css" - - "**.md" - - "**.html" - -jobs: - test: - runs-on: ubuntu-latest - strategy: - matrix: - container: [1, 2, 3, 4] - - name: Python Unit Tests - - steps: - - name: Pass skipped tests unconditionally - run: "echo Skipped" diff --git a/.github/workflows/server-tests-mariadb.yml b/.github/workflows/server-tests-mariadb.yml deleted file mode 100644 index 7bef248535c6..000000000000 --- a/.github/workflows/server-tests-mariadb.yml +++ /dev/null @@ -1,158 +0,0 @@ -name: Server (Mariadb) - -on: - pull_request: - paths-ignore: - - '**.js' - - '**.css' - - '**.md' - - '**.html' - schedule: - # Run everday at midnight UTC / 5:30 IST - - cron: "0 0 * * *" - workflow_dispatch: - inputs: - user: - description: 'Frappe Framework repository user (add your username for forks)' - required: true - default: 'frappe' - type: string - branch: - description: 'Frappe Framework branch' - default: 'develop' - required: false - type: string - -concurrency: - group: server-mariadb-develop-${{ github.event_name }}-${{ github.event.number || github.event_name == 'workflow_dispatch' && github.run_id || '' }} - cancel-in-progress: true - -jobs: - test: - runs-on: ubuntu-latest - timeout-minutes: 60 - env: - NODE_ENV: "production" - WITH_COVERAGE: ${{ github.event_name != 'pull_request' }} - - strategy: - fail-fast: false - - matrix: - container: [1, 2, 3, 4] - - name: Python Unit Tests - - services: - mysql: - image: mariadb:10.6 - env: - MARIADB_ROOT_PASSWORD: 'root' - ports: - - 3306:3306 - options: --health-cmd="mariadb-admin ping" --health-interval=5s --health-timeout=2s --health-retries=3 - - steps: - - name: Clone - uses: actions/checkout@v4 - - - name: Setup Python - uses: actions/setup-python@v5 - with: - python-version: '3.12' - - - name: Check for valid Python & Merge Conflicts - run: | - python -m compileall -f "${GITHUB_WORKSPACE}" - if grep -lr --exclude-dir=node_modules "^<<<<<<< " "${GITHUB_WORKSPACE}" - then echo "Found merge conflicts" - exit 1 - fi - - - name: Setup Node - uses: actions/setup-node@v4 - with: - node-version: 18 - 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@v4 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('**/*requirements.txt', '**/pyproject.toml') }} - restore-keys: | - ${{ runner.os }}-pip- - ${{ runner.os }}- - - - name: Cache node modules - uses: actions/cache@v4 - 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 "::set-output name=dir::$(yarn cache dir)" - - - uses: actions/cache@v4 - 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 - run: bash ${GITHUB_WORKSPACE}/.github/helper/install.sh - env: - DB: mariadb - TYPE: server - FRAPPE_USER: ${{ github.event.inputs.user }} - FRAPPE_BRANCH: ${{ github.event.inputs.branch }} - - - name: Run Tests - run: 'cd ~/frappe-bench/ && bench --site test_site run-parallel-tests --app erpnext --total-builds ${{ strategy.job-total }} --build-number ${{ matrix.container }}' - env: - TYPE: server - CAPTURE_COVERAGE: ${{ github.event_name != 'pull_request' }} - - - - name: Show bench output - if: ${{ always() }} - run: cat ~/frappe-bench/bench_start.log || true - - - name: Upload coverage data - uses: actions/upload-artifact@v3 - if: github.event_name != 'pull_request' - with: - name: coverage-${{ matrix.container }} - path: /home/runner/frappe-bench/sites/coverage.xml - - coverage: - name: Coverage Wrap Up - needs: test - runs-on: ubuntu-latest - if: ${{ github.event_name != 'pull_request' }} - steps: - - name: Clone - uses: actions/checkout@v4 - - - name: Download artifacts - uses: actions/download-artifact@v3 - - - name: Upload coverage data - uses: codecov/codecov-action@v4 - with: - name: MariaDB - token: ${{ secrets.CODECOV_TOKEN }} - fail_ci_if_error: true - verbose: true diff --git a/.github/workflows/server-tests-postgres.yml b/.github/workflows/server-tests-postgres.yml deleted file mode 100644 index 7b2d52acd19c..000000000000 --- a/.github/workflows/server-tests-postgres.yml +++ /dev/null @@ -1,112 +0,0 @@ -name: Server (Postgres) - -on: - pull_request: - paths-ignore: - - '**.js' - - '**.md' - - '**.html' - types: [opened, labelled, synchronize, reopened] - -concurrency: - group: server-postgres-develop-${{ github.event_name }}-${{ github.event.number || github.event_name == 'workflow_dispatch' && github.run_id || '' }} - cancel-in-progress: true - -jobs: - test: - if: ${{ contains(github.event.pull_request.labels.*.name, 'postgres') }} - runs-on: ubuntu-latest - timeout-minutes: 60 - - strategy: - fail-fast: false - matrix: - container: [1] - - name: Python Unit Tests - - services: - postgres: - image: postgres:13.3 - env: - POSTGRES_PASSWORD: travis - options: >- - --health-cmd pg_isready - --health-interval 10s - --health-timeout 5s - --health-retries 5 - ports: - - 5432:5432 - - steps: - - - name: Clone - uses: actions/checkout@v4 - - - name: Setup Python - uses: actions/setup-python@v5 - with: - python-version: '3.12' - - - name: Check for valid Python & Merge Conflicts - run: | - python -m compileall -f "${GITHUB_WORKSPACE}" - if grep -lr --exclude-dir=node_modules "^<<<<<<< " "${GITHUB_WORKSPACE}" - then echo "Found merge conflicts" - exit 1 - fi - - - name: Setup Node - uses: actions/setup-node@v4 - with: - node-version: 18 - 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@v4 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('**/*requirements.txt', '**/pyproject.toml') }} - restore-keys: | - ${{ runner.os }}-pip- - ${{ runner.os }}- - - - name: Cache node modules - uses: actions/cache@v4 - 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 "::set-output name=dir::$(yarn cache dir)" - - - uses: actions/cache@v4 - 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 - run: bash ${GITHUB_WORKSPACE}/.github/helper/install.sh - env: - DB: postgres - TYPE: server - - - name: Run Tests - run: cd ~/frappe-bench/ && bench --site test_site run-parallel-tests --app erpnext --use-orchestrator - env: - TYPE: server - CI_BUILD_ID: ${{ github.run_id }} - ORCHESTRATOR_URL: http://test-orchestrator.frappe.io