Skip to content

Commit

Permalink
ci: run each test individually
Browse files Browse the repository at this point in the history
  • Loading branch information
blaggacao committed Oct 13, 2024
1 parent cc954d9 commit 99b205f
Showing 1 changed file with 232 additions and 0 deletions.
232 changes: 232 additions & 0 deletions .github/workflows/run-indinvidual-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,232 @@
name: Individual Server Tests

on:
workflow_dispatch:

concurrency:
group: server-individual-tests-develop-${{ github.event_name }}-${{ github.event.number || github.event_name == 'workflow_dispatch' && github.run_id || '' }}
cancel-in-progress: false

jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 60
env:
NODE_ENV: "production"

strategy:
fail-fast: false

matrix:
test:
- erpnext.support.doctype.service_level_agreement.test_service_level_agreement
- erpnext.support.doctype.issue_priority.test_issue_priority
- erpnext.subcontracting.doctype.subcontracting_receipt.test_subcontracting_receipt
- erpnext.subcontracting.doctype.subcontracting_order.test_subcontracting_order
- erpnext.stock.doctype.warehouse.test_warehouse
- erpnext.support.doctype.issue.test_issue
- erpnext.stock.doctype.stock_settings.test_stock_settings
- erpnext.stock.doctype.stock_reposting_settings.test_stock_reposting_settings
- erpnext.stock.doctype.stock_reconciliation.test_stock_reconciliation
- erpnext.stock.doctype.stock_ledger_entry.test_stock_ledger_entry
- erpnext.stock.doctype.stock_entry_type.test_stock_entry_type
- erpnext.stock.doctype.stock_entry.test_stock_entry
- erpnext.stock.doctype.shipment.test_shipment
- erpnext.stock.doctype.serial_no.test_serial_no
- erpnext.stock.doctype.serial_and_batch_bundle.test_serial_and_batch_bundle
- erpnext.stock.doctype.repost_item_valuation.test_repost_item_valuation
- erpnext.stock.doctype.quality_inspection.test_quality_inspection
- erpnext.stock.doctype.putaway_rule.test_putaway_rule
- erpnext.stock.doctype.purchase_receipt.test_purchase_receipt
- erpnext.stock.doctype.pick_list.test_pick_list
- erpnext.stock.doctype.packing_slip.test_packing_slip
- erpnext.stock.doctype.packed_item.test_packed_item
- erpnext.stock.doctype.material_request.test_material_request
- erpnext.stock.doctype.landed_cost_voucher.test_landed_cost_voucher
- erpnext.stock.doctype.item_price.test_item_price
- erpnext.stock.doctype.item_attribute.test_item_attribute
- erpnext.stock.doctype.item_alternative.test_item_alternative
- erpnext.stock.doctype.item.test_item
- erpnext.stock.doctype.inventory_dimension.test_inventory_dimension
- erpnext.stock.doctype.delivery_trip.test_delivery_trip
- erpnext.stock.doctype.delivery_note.test_delivery_note
- erpnext.stock.doctype.bin.test_bin
- erpnext.stock.doctype.batch.test_batch
- erpnext.setup.doctype.vehicle.test_vehicle
- erpnext.setup.doctype.transaction_deletion_record.test_transaction_deletion_record
- erpnext.setup.doctype.item_group.test_item_group
- erpnext.setup.doctype.holiday_list.test_holiday_list
- erpnext.setup.doctype.employee.test_employee
- erpnext.setup.doctype.department.test_department
- erpnext.setup.doctype.currency_exchange.test_currency_exchange
- erpnext.setup.doctype.company.test_company
- erpnext.selling.doctype.selling_settings.test_selling_settings
- erpnext.selling.doctype.sales_order.test_sales_order
- erpnext.selling.doctype.quotation.test_quotation
- erpnext.selling.doctype.party_specific_item.test_party_specific_item
- erpnext.selling.doctype.customer.test_customer
- erpnext.stock.doctype.stock_reservation_entry.test_stock_reservation_entry
- erpnext.quality_management.doctype.quality_review.test_quality_review
- erpnext.quality_management.doctype.quality_procedure.test_quality_procedure
- erpnext.quality_management.doctype.quality_goal.test_quality_goal
- erpnext.quality_management.doctype.quality_feedback.test_quality_feedback
- erpnext.projects.doctype.timesheet.test_timesheet
- erpnext.projects.doctype.project.test_project
- erpnext.projects.doctype.activity_cost.test_activity_cost
- erpnext.manufacturing.doctype.workstation.test_workstation
- erpnext.manufacturing.doctype.work_order.test_work_order
- erpnext.manufacturing.doctype.routing.test_routing
- erpnext.manufacturing.doctype.production_plan.test_production_plan
- erpnext.manufacturing.doctype.job_card.test_job_card
- erpnext.manufacturing.doctype.bom_update_log.test_bom_update_log
- erpnext.manufacturing.doctype.bom.test_bom
- erpnext.manufacturing.doctype.blanket_order.test_blanket_order
- erpnext.maintenance.doctype.maintenance_schedule.test_maintenance_schedule
- erpnext.erpnext_integrations.doctype.plaid_settings.test_plaid_settings
- erpnext.crm.doctype.prospect.test_prospect
- erpnext.crm.doctype.opportunity.test_opportunity
- erpnext.crm.doctype.lead.test_lead
- erpnext.crm.doctype.contract.test_contract
- erpnext.crm.doctype.appointment.test_appointment
- erpnext.buying.doctype.supplier_scorecard_variable.test_supplier_scorecard_variable
- erpnext.buying.doctype.supplier_scorecard_criteria.test_supplier_scorecard_criteria
- erpnext.buying.doctype.supplier_scorecard.test_supplier_scorecard
- erpnext.buying.doctype.supplier_quotation.test_supplier_quotation
- erpnext.buying.doctype.supplier.test_supplier
- erpnext.buying.doctype.request_for_quotation.test_request_for_quotation
- erpnext.buying.doctype.purchase_order.test_purchase_order
- erpnext.assets.doctype.asset_value_adjustment.test_asset_value_adjustment
- erpnext.assets.doctype.asset_shift_allocation.test_asset_shift_allocation
- erpnext.assets.doctype.asset_repair.test_asset_repair
- erpnext.assets.doctype.asset_movement.test_asset_movement
- erpnext.assets.doctype.asset_maintenance.test_asset_maintenance
- erpnext.assets.doctype.asset_depreciation_schedule.test_asset_depreciation_schedule
- erpnext.assets.doctype.asset_category.test_asset_category
- erpnext.assets.doctype.asset_capitalization.test_asset_capitalization
- erpnext.assets.doctype.asset.test_asset
- erpnext.accounts.doctype.unreconcile_payment.test_unreconcile_payment
- erpnext.accounts.doctype.tax_withholding_category.test_tax_withholding_category
- erpnext.accounts.doctype.tax_rule.test_tax_rule
- erpnext.accounts.doctype.subscription.test_subscription
- erpnext.accounts.doctype.shipping_rule.test_shipping_rule
- erpnext.accounts.doctype.share_transfer.test_share_transfer
- erpnext.accounts.doctype.sales_invoice.test_sales_invoice
- erpnext.accounts.doctype.repost_accounting_ledger.test_repost_accounting_ledger
- erpnext.accounts.doctype.purchase_invoice.test_purchase_invoice
- erpnext.accounts.doctype.promotional_scheme.test_promotional_scheme
- erpnext.accounts.doctype.process_statement_of_accounts.test_process_statement_of_accounts
- erpnext.accounts.doctype.process_deferred_accounting.test_process_deferred_accounting
- erpnext.accounts.doctype.pricing_rule.test_pricing_rule
- erpnext.accounts.doctype.pos_profile.test_pos_profile
- erpnext.accounts.doctype.pos_invoice_merge_log.test_pos_invoice_merge_log
- erpnext.accounts.doctype.pos_invoice.test_pos_invoice
- erpnext.accounts.doctype.pos_closing_entry.test_pos_closing_entry
- erpnext.accounts.doctype.period_closing_voucher.test_period_closing_voucher
- erpnext.accounts.doctype.payment_terms_template.test_payment_terms_template
- erpnext.accounts.doctype.payment_request.test_payment_request
- erpnext.accounts.doctype.payment_reconciliation.test_payment_reconciliation
- erpnext.accounts.doctype.payment_order.test_payment_order
- erpnext.accounts.doctype.payment_ledger_entry.test_payment_ledger_entry
- erpnext.accounts.doctype.payment_entry.test_payment_entry
- erpnext.accounts.doctype.opening_invoice_creation_tool.test_opening_invoice_creation_tool
- erpnext.accounts.doctype.loyalty_program.test_loyalty_program
- erpnext.accounts.doctype.loyalty_point_entry.test_loyalty_point_entry
- erpnext.accounts.doctype.ledger_merge.test_ledger_merge
- erpnext.accounts.doctype.ledger_health.test_ledger_health
- erpnext.accounts.doctype.journal_entry.test_journal_entry
- erpnext.accounts.doctype.invoice_discounting.test_invoice_discounting
- erpnext.accounts.doctype.gl_entry.test_gl_entry
- erpnext.accounts.doctype.fiscal_year.test_fiscal_year
- erpnext.accounts.doctype.finance_book.test_finance_book
- erpnext.accounts.doctype.exchange_rate_revaluation.test_exchange_rate_revaluation
- erpnext.accounts.doctype.dunning.test_dunning
- erpnext.projects.doctype.task.test_task
- erpnext.manufacturing.doctype.bom_creator.test_bom_creator
- erpnext.accounts.doctype.cost_center.test_cost_center
- erpnext.accounts.doctype.budget.test_budget
- erpnext.accounts.doctype.bank_transaction.test_bank_transaction
- erpnext.accounts.doctype.bank_transaction.test_auto_match_party
- erpnext.accounts.doctype.bank_reconciliation_tool.test_bank_reconciliation_tool
- erpnext.accounts.doctype.bank_clearance.test_bank_clearance
- erpnext.accounts.doctype.bank_account.test_bank_account
- erpnext.accounts.doctype.accounts_settings.test_accounts_settings
- erpnext.accounts.doctype.accounting_period.test_accounting_period
- erpnext.accounts.doctype.accounting_dimension_filter.test_accounting_dimension_filter
- erpnext.accounts.doctype.accounting_dimension.test_accounting_dimension
- erpnext.accounts.doctype.account.test_account
- erpnext.accounts.doctype.coupon_code.test_coupon_code
- erpnext.accounts.doctype.cost_center_allocation.test_cost_center_allocation
- erpnext.manufacturing.doctype.bom_update_tool.test_bom_update_tool

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: 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-tests --app erpnext --module ${{ matrix.test }}'

0 comments on commit 99b205f

Please sign in to comment.