-
Notifications
You must be signed in to change notification settings - Fork 7.6k
83 lines (75 loc) · 2.24 KB
/
server-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Server
on:
repository_dispatch:
types: [frappe-framework-change]
pull_request:
workflow_dispatch:
schedule:
# Run everday at midnight UTC / 5:30 IST
- cron: "0 0 * * *"
concurrency:
group: server-${{ github.event_name }}-${{ github.event.number }}
cancel-in-progress: true
permissions:
# Do not change this as GITHUB_TOKEN is being used by roulette
contents: read
jobs:
typecheck:
name: Types
uses: frappe/frappe/.github/workflows/type-check-base.yml@develop
test:
name: Tests
needs: [typecheck]
uses: frappe/frappe/.github/workflows/tests-base.yml@develop
with:
# This will test against both MariaDB and PostgreSQL, if enabled
enable-postgres: ${{ contains(github.event.pull_request.labels.*.name, 'postgres') }}
parallel-runs: 4
enable-coverage: ${{ github.event_name != 'pull_request' }}
secrets: inherit
migrate:
name: Migration
needs: [typecheck]
uses: frappe/frappe/.github/workflows/patch-base.yml@develop
with:
python-version: '3.10'
node-version: 20
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/[email protected]
- name: Upload coverage data
uses: codecov/codecov-action@v5
with:
name: Server
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
verbose: true
flags: server
dispatch:
name: Downstream
runs-on: "ubuntu-latest"
needs: [test, migrate]
if: ${{ contains( github.event.pull_request.labels.*.name, 'trigger-downstream-ci') }}
strategy:
matrix:
repo:
- frappe/lending
- frappe/hrms
- frappe/payments
- frappe/ecommerce_integrations
- frappe/webshop
steps:
- name: Dispatch Downstream CI (if supported)
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.CI_PAT }}
repository: ${{ matrix.repo }}
event-type: erpnext-framework-change
client-payload: '{"frappe_sha": "${{ github.sha }}"}'