-
Notifications
You must be signed in to change notification settings - Fork 1
107 lines (100 loc) · 3.61 KB
/
pull-request-or-push-to-master.yaml
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# Example workflow for checking PRs and commits
name: Pull Request or Push to master
on:
pull_request: {}
push:
branches: [master]
workflow_dispatch: {}
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions: {}
jobs:
trunk_check:
name: Trunk Check
runs-on: ubuntu-latest
permissions:
checks: write # For Trunk to post annotations
contents: read
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Setup NodeJS
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 20.11.1
cache: npm
- name: Install package dependencies
run: npm ci
- name: Generate types
run: npm run codecept:types
env:
TESTS_MOBILE_COMMON_LAUNCH_TYPE: ${{ vars.TESTS_MOBILE_COMMON_LAUNCH_TYPE }}
TESTS_MOBILE_COMMON_USER_PASSWORD: ${{ secrets.TESTS_MOBILE_COMMON_USER_PASSWORD }}
TESTS_MOBILE_COMMON_USER_USERNAME: ${{ secrets.TESTS_MOBILE_COMMON_USER_USERNAME }}
TESTS_MOBILE_LOCAL_APP_PATH: ${{ vars.TESTS_MOBILE_LOCAL_APP_PATH }}
TESTS_MOBILE_LOCAL_PLATFORM: ${{ vars.TESTS_MOBILE_LOCAL_PLATFORM }}
TESTS_MOBILE_LOCAL_DEVICE: ${{ vars.TESTS_MOBILE_LOCAL_DEVICE }}
- name: Trunk Check
uses: trunk-io/trunk-action@f6c5f1b90503c30e02059667dbc247f2257b63c5 # v1.1.15
build_check:
name: Build Check
runs-on: ubuntu-latest
permissions:
contents: read
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Setup NodeJS
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 20.11.1
cache: npm
- name: Install package dependencies
run: npm ci
- name: Generate types
run: npm run codecept:types
env:
TESTS_MOBILE_COMMON_LAUNCH_TYPE: ${{ vars.TESTS_MOBILE_COMMON_LAUNCH_TYPE }}
TESTS_MOBILE_COMMON_USER_PASSWORD: ${{ secrets.TESTS_MOBILE_COMMON_USER_PASSWORD }}
TESTS_MOBILE_COMMON_USER_USERNAME: ${{ secrets.TESTS_MOBILE_COMMON_USER_USERNAME }}
TESTS_MOBILE_LOCAL_APP_PATH: ${{ vars.TESTS_MOBILE_LOCAL_APP_PATH }}
TESTS_MOBILE_LOCAL_PLATFORM: ${{ vars.TESTS_MOBILE_LOCAL_PLATFORM }}
TESTS_MOBILE_LOCAL_DEVICE: ${{ vars.TESTS_MOBILE_LOCAL_DEVICE }}
- name: Run build check
run: npm run dist:check
run_tests:
name: Run Tests
runs-on: ubuntu-latest
permissions:
contents: read
timeout-minutes: 8
steps:
- name: Checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Setup NodeJS
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 20.11.1
cache: npm
- name: Install package dependencies
run: npm ci --production
# - name: Run all tests
# run: npm run test
# - name: Run backend tests
# run: npm run test:api
# - name: Run infrastructure tests
# run: npm run test:infra
# - name: Run mobile tests
# run: npm run test:mobile
- name: Run web tests
run: npm run test:web
- name: Upload test artifacts
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
if: always()
with:
name: test-reports
path: reports/
retention-days: 30