|
1 | | -# name: Shared Steps |
2 | | - |
3 | | -# on: |
4 | | -# workflow_call: |
5 | | -# inputs: |
6 | | -# branch: |
7 | | -# required: true |
8 | | -# type: string |
9 | | - |
10 | | -# jobs: |
11 | | -# unit-test: |
12 | | -# runs-on: ubuntu-latest |
13 | | -# strategy: |
14 | | -# matrix: |
15 | | -# node-version: [16, 18] |
16 | | -# steps: |
17 | | -# - name: Checkout for nightly CI |
18 | | -# if: github.event_name == 'schedule' |
19 | | -# uses: actions/checkout@v3 |
20 | | -# with: |
21 | | -# ref: ${{ inputs.branch }} |
22 | | - |
23 | | -# - name: Checkout |
24 | | -# if: github.event_name != 'schedule' |
25 | | -# uses: actions/checkout@v3 |
26 | | - |
27 | | -# - name: Get branch name |
28 | | -# run: | |
29 | | -# echo "Branch name from trigger: ${{ inputs.branch }}" |
30 | | - |
31 | | -# - name: Install node required |
32 | | -# uses: actions/setup-node@v3 |
33 | | -# with: |
34 | | -# node-version: ${{ matrix.node-version }} |
35 | | - |
36 | | -# - name: Install dependencies |
37 | | -# run: npm ci |
38 | | - |
39 | | -# - name: run hello.js |
40 | | -# run: | |
41 | | -# node ./hello.js |
42 | | - |
43 | | -# api-test: |
44 | | -# runs-on: ubuntu-latest |
45 | | -# strategy: |
46 | | -# matrix: |
47 | | -# node-version: [16, 18] |
48 | | -# steps: |
49 | | -# - name: Checkout for nightly CI |
50 | | -# if: github.event_name == 'schedule' |
51 | | -# uses: actions/checkout@v3 |
52 | | -# with: |
53 | | -# ref: ${{ inputs.branch }} |
54 | | - |
55 | | -# - name: Checkout |
56 | | -# if: github.event_name != 'schedule' |
57 | | -# uses: actions/checkout@v3 |
58 | | - |
59 | | -# - name: Get branch name |
60 | | -# run: | |
61 | | -# echo "Branch name from trigger: ${{ inputs.branch }}" |
62 | | - |
63 | | -# - name: Install node required |
64 | | -# uses: actions/setup-node@v3 |
65 | | -# with: |
66 | | -# node-version: ${{ matrix.node-version }} |
67 | | - |
68 | | -# - name: Install dependencies |
69 | | -# run: npm ci |
70 | | - |
71 | | -# - name: run hello.js |
72 | | -# run: | |
73 | | -# node ./hello.js |
74 | | - |
75 | | -# notify: |
76 | | -# needs: |
77 | | -# - unit-test |
78 | | -# - api-test |
79 | | -# # if: ${{ always() && github.event_name == 'schedule' }} |
80 | | -# if: ${{ always() }} |
81 | | -# runs-on: ubuntu-latest |
82 | | -# steps: |
83 | | -# - name: checkout |
84 | | -# uses: actions/checkout@v2 |
85 | | -# with: |
86 | | -# ref: main |
87 | | - |
88 | | -# - name: Step 2 |
89 | | -# env: |
90 | | -# ELEMENT_CHAT_URL: ${{ secrets.ELEMENT_CHAT_URL }} |
91 | | -# ELEMENT_ROOM_ID: ${{ secrets.ELEMENT_ROOM_ID }} |
92 | | -# NIGHTLY_CI_USER_TOKEN: ${{ secrets.NIGHTLY_CI_USER_TOKEN }} |
93 | | -# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
94 | | -# REPO_OWNER: ${{ github.actor }} |
95 | | -# REPO_NAME: ${{ github.event.repository.name }} |
96 | | -# RUN_ID: ${{ github.run_id }} |
97 | | -# BRANCH_NAME: ${{ inputs.branch }} |
98 | | -# run: ./.github/scripts/notify.sh |
| 1 | +name: Shared Steps |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_call: |
| 5 | + inputs: |
| 6 | + branch: |
| 7 | + required: true |
| 8 | + type: string |
| 9 | + |
| 10 | +jobs: |
| 11 | + unit-test: |
| 12 | + runs-on: ubuntu-latest |
| 13 | + strategy: |
| 14 | + matrix: |
| 15 | + node-version: [16, 22] |
| 16 | + php-version: [8.0, 8.1] |
| 17 | + isReleaseBranch: |
| 18 | + - false |
| 19 | + |
| 20 | + include: |
| 21 | + - node-version: 18 |
| 22 | + php-version: 8.0 |
| 23 | + - node-version: 20 |
| 24 | + isReleaseBranch: 8.1 |
| 25 | + |
| 26 | + exclude: |
| 27 | + - isReleaseBranch: true |
| 28 | + node-version: 22 |
| 29 | + - isReleaseBranch: false |
| 30 | + node-version: 22 |
| 31 | + php-version: 8.0 |
| 32 | + |
| 33 | + |
| 34 | + steps: |
| 35 | + - name: Checkout for nightly CI |
| 36 | + if: github.event_name == 'schedule' |
| 37 | + uses: actions/checkout@v3 |
| 38 | + with: |
| 39 | + ref: ${{ inputs.branch }} |
| 40 | + |
| 41 | + - name: Checkout |
| 42 | + if: github.event_name != 'schedule' |
| 43 | + uses: actions/checkout@v3 |
| 44 | + |
| 45 | + - name: Get branch name |
| 46 | + run: | |
| 47 | + echo "Branch name from trigger: ${{ inputs.branch }}" |
| 48 | +
|
| 49 | + - name: Install node required |
| 50 | + uses: actions/setup-node@v3 |
| 51 | + with: |
| 52 | + node-version: ${{ matrix.node-version }} |
| 53 | + |
| 54 | + - name: Install dependencies |
| 55 | + run: npm ci |
| 56 | + |
| 57 | + # - name: run hello.js |
| 58 | + # run: | |
| 59 | + # node ./hello.js |
| 60 | + |
| 61 | + # api-test: |
| 62 | + # runs-on: ubuntu-latest |
| 63 | + # strategy: |
| 64 | + # matrix: |
| 65 | + # node-version: [16, 18] |
| 66 | + # steps: |
| 67 | + # - name: Checkout for nightly CI |
| 68 | + # if: github.event_name == 'schedule' |
| 69 | + # uses: actions/checkout@v3 |
| 70 | + # with: |
| 71 | + # ref: ${{ inputs.branch }} |
| 72 | + |
| 73 | + # - name: Checkout |
| 74 | + # if: github.event_name != 'schedule' |
| 75 | + # uses: actions/checkout@v3 |
| 76 | + |
| 77 | + # - name: Get branch name |
| 78 | + # run: | |
| 79 | + # echo "Branch name from trigger: ${{ inputs.branch }}" |
| 80 | + |
| 81 | + # - name: Install node required |
| 82 | + # uses: actions/setup-node@v3 |
| 83 | + # with: |
| 84 | + # node-version: ${{ matrix.node-version }} |
| 85 | + |
| 86 | + # - name: Install dependencies |
| 87 | + # run: npm ci |
| 88 | + |
| 89 | + # - name: run hello.js |
| 90 | + # run: | |
| 91 | + # node ./hello.js |
| 92 | + |
| 93 | + # notify: |
| 94 | + # needs: |
| 95 | + # - unit-test |
| 96 | + # - api-test |
| 97 | + # # if: ${{ always() && github.event_name == 'schedule' }} |
| 98 | + # if: ${{ always() }} |
| 99 | + # runs-on: ubuntu-latest |
| 100 | + # steps: |
| 101 | + # - name: checkout |
| 102 | + # uses: actions/checkout@v2 |
| 103 | + # with: |
| 104 | + # ref: main |
| 105 | + |
| 106 | + # - name: Step 2 |
| 107 | + # env: |
| 108 | + # ELEMENT_CHAT_URL: ${{ secrets.ELEMENT_CHAT_URL }} |
| 109 | + # ELEMENT_ROOM_ID: ${{ secrets.ELEMENT_ROOM_ID }} |
| 110 | + # NIGHTLY_CI_USER_TOKEN: ${{ secrets.NIGHTLY_CI_USER_TOKEN }} |
| 111 | + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 112 | + # REPO_OWNER: ${{ github.actor }} |
| 113 | + # REPO_NAME: ${{ github.event.repository.name }} |
| 114 | + # RUN_ID: ${{ github.run_id }} |
| 115 | + # BRANCH_NAME: ${{ inputs.branch }} |
| 116 | + # run: ./.github/scripts/notify.sh |
0 commit comments