|
1 | 1 | name: "Build"
|
2 | 2 | on:
|
3 |
| - push: |
4 |
| - branches: |
5 |
| - - "1.x" |
6 |
| - tags: |
7 |
| - - v1* |
| 3 | + push: |
| 4 | + branches: |
| 5 | + - "1.x" |
| 6 | + tags: |
| 7 | + - v1* |
| 8 | + paths-ignore: |
| 9 | + - "docs/**" |
| 10 | + - "assets/**" |
| 11 | + - "**.md" |
8 | 12 | pull_request:
|
9 |
| - branches: |
10 |
| - - "1.x" |
11 |
| - types: [opened, reopened, synchronize] |
| 13 | + branches: |
| 14 | + - "1.x" |
| 15 | + types: [opened, reopened, synchronize] |
12 | 16 | jobs:
|
13 |
| - lint: |
14 |
| - runs-on: ubuntu-latest |
15 |
| - env: |
16 |
| - TEST: "build_and_lint" |
17 |
| - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
18 |
| - steps: |
19 |
| - - uses: actions/setup-node@v1 |
20 |
| - with: |
21 |
| - node-version: 12 |
22 |
| - |
23 |
| - - uses: actions/checkout@v2 |
24 |
| - |
25 |
| - - uses: actions/cache@v2 |
26 |
| - id: cache-deps |
27 |
| - with: |
28 |
| - path: | |
29 |
| - node_modules |
30 |
| - */*/node_modules |
31 |
| - key: ${{ runner.os }}-node12-${{ hashFiles('**/package-lock.json') }} |
32 |
| - |
33 |
| - - run: npm ci |
34 |
| - if: steps.cache-deps.outputs.cache-hit != 'true' |
35 |
| - |
36 |
| - - run: bash ./scripts/ci.sh |
| 17 | + lint: |
| 18 | + runs-on: ubuntu-latest |
| 19 | + env: |
| 20 | + TEST: "build_and_lint" |
| 21 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 22 | + steps: |
| 23 | + - uses: actions/setup-node@v1 |
| 24 | + with: |
| 25 | + node-version: 12 |
| 26 | + |
| 27 | + - uses: actions/checkout@v2 |
| 28 | + |
| 29 | + - uses: actions/cache@v2 |
| 30 | + id: cache-deps |
| 31 | + with: |
| 32 | + path: | |
| 33 | + node_modules |
| 34 | + */*/node_modules |
| 35 | + key: ${{ runner.os }}-node12-${{ hashFiles('**/package-lock.json') }} |
| 36 | + |
| 37 | + - run: npm ci |
| 38 | + if: steps.cache-deps.outputs.cache-hit != 'true' |
| 39 | + |
| 40 | + - run: bash ./scripts/ci.sh |
37 | 41 | unit:
|
38 |
| - runs-on: ubuntu-latest |
39 |
| - strategy: |
40 |
| - matrix: |
41 |
| - node: [8, 10, 11, 12, 13] |
| 42 | + runs-on: ubuntu-latest |
| 43 | + strategy: |
| 44 | + matrix: |
| 45 | + node: [8, 10, 11, 12, 13] |
42 | 46 | env:
|
43 |
| - TEST: "unit" |
| 47 | + TEST: "unit" |
44 | 48 | steps:
|
45 |
| - - uses: actions/setup-node@v1 |
46 |
| - with: |
47 |
| - node-version: ${{ matrix.node }} |
| 49 | + - uses: actions/setup-node@v1 |
| 50 | + with: |
| 51 | + node-version: ${{ matrix.node }} |
48 | 52 |
|
49 |
| - - uses: actions/checkout@v2 |
| 53 | + - uses: actions/checkout@v2 |
50 | 54 |
|
51 |
| - - uses: actions/cache@v2 |
52 |
| - id: cache-deps |
53 |
| - with: |
54 |
| - path: | |
55 |
| - node_modules |
56 |
| - */*/node_modules |
57 |
| - key: ${{ runner.os }}-node${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }} |
| 55 | + - uses: actions/cache@v2 |
| 56 | + id: cache-deps |
| 57 | + with: |
| 58 | + path: | |
| 59 | + node_modules |
| 60 | + */*/node_modules |
| 61 | + key: ${{ runner.os }}-node${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }} |
58 | 62 |
|
59 |
| - - run: npm ci |
60 |
| - if: steps.cache-deps.outputs.cache-hit != 'true' |
| 63 | + - run: npm ci |
| 64 | + if: steps.cache-deps.outputs.cache-hit != 'true' |
61 | 65 |
|
62 |
| - - run: bash ./scripts/ci.sh |
| 66 | + - run: bash ./scripts/ci.sh |
63 | 67 | e2e:
|
64 |
| - runs-on: ubuntu-latest |
65 |
| - strategy: |
66 |
| - fail-fast: false |
67 |
| - matrix: |
68 |
| - testCmd: |
69 |
| - [ |
70 |
| - 'unit_and_e2e_clients', |
71 |
| - 'e2e_browsers', |
72 |
| - 'e2e_ganache', |
73 |
| - 'e2e_mosaic', |
74 |
| - 'e2e_gnosis_dex', |
75 |
| - ] |
| 68 | + runs-on: ubuntu-latest |
| 69 | + strategy: |
| 70 | + fail-fast: false |
| 71 | + matrix: |
| 72 | + testCmd: |
| 73 | + [ |
| 74 | + 'unit_and_e2e_clients', |
| 75 | + 'e2e_browsers', |
| 76 | + 'e2e_ganache', |
| 77 | + 'e2e_mosaic', |
| 78 | + 'e2e_gnosis_dex', |
| 79 | + ] |
76 | 80 | env:
|
77 |
| - TEST: ${{ matrix.testCmd }} |
78 |
| - INFURA_HTTP: ${{ secrets.INFURA_HTTP }} |
| 81 | + TEST: ${{ matrix.testCmd }} |
| 82 | + INFURA_HTTP: ${{ secrets.INFURA_HTTP }} |
79 | 83 | steps:
|
80 |
| - - uses: actions/setup-node@v1 |
81 |
| - with: |
82 |
| - node-version: 12 |
83 |
| - - uses: actions/checkout@v2 |
84 |
| - |
85 |
| - - uses: actions/cache@v2 |
86 |
| - id: cache-deps |
87 |
| - if: env.TEST == 'unit_and_e2e_clients' || env.TEST == 'e2e_browsers' |
88 |
| - with: |
89 |
| - path: | |
90 |
| - node_modules |
91 |
| - */*/node_modules |
92 |
| - key: ${{ runner.os }}-node12-${{ hashFiles('**/package-lock.json') }} |
93 |
| - |
94 |
| - - run: npm ci |
95 |
| - if: (env.TEST == 'unit_and_e2e_clients' || env.TEST == 'e2e_browsers') && steps.cache-deps.outputs.cache-hit != 'true' |
96 |
| - |
97 |
| - - run: bash ./scripts/ci.sh |
98 |
| - |
99 |
| - - name: Send coverage reports to Coveralls |
100 |
| - if: env.TEST == 'unit_and_e2e_clients' |
101 |
| - uses: coverallsapp/github-action@master |
102 |
| - with: |
103 |
| - github-token: ${{ secrets.GITHUB_TOKEN }} |
| 84 | + - uses: actions/setup-node@v1 |
| 85 | + with: |
| 86 | + node-version: 12 |
| 87 | + - uses: actions/checkout@v2 |
| 88 | + |
| 89 | + - uses: actions/cache@v2 |
| 90 | + id: cache-deps |
| 91 | + if: env.TEST == 'unit_and_e2e_clients' || env.TEST == 'e2e_browsers' |
| 92 | + with: |
| 93 | + path: | |
| 94 | + node_modules |
| 95 | + */*/node_modules |
| 96 | + key: ${{ runner.os }}-node12-${{ hashFiles('**/package-lock.json') }} |
| 97 | + |
| 98 | + - run: npm ci |
| 99 | + if: (env.TEST == 'unit_and_e2e_clients' || env.TEST == 'e2e_browsers') && steps.cache-deps.outputs.cache-hit != 'true' |
| 100 | + |
| 101 | + - run: bash ./scripts/ci.sh |
| 102 | + |
| 103 | + - name: Send coverage reports to Coveralls |
| 104 | + if: env.TEST == 'unit_and_e2e_clients' |
| 105 | + uses: coverallsapp/github-action@master |
| 106 | + with: |
| 107 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
104 | 108 | e2e_windows:
|
105 |
| - runs-on: windows-latest |
106 |
| - env: |
107 |
| - TEST: "e2e_windows" |
108 |
| - INFURA_HTTP: ${{ secrets.INFURA_HTTP }} |
109 |
| - INFURA_WSS: ${{ secrets.INFURA_WSS }} |
| 109 | + runs-on: windows-latest |
| 110 | + env: |
| 111 | + TEST: "e2e_windows" |
| 112 | + INFURA_HTTP: ${{ secrets.INFURA_HTTP }} |
| 113 | + INFURA_WSS: ${{ secrets.INFURA_WSS }} |
110 | 114 | steps:
|
111 |
| - - uses: actions/setup-node@v1 |
112 |
| - with: |
113 |
| - node-version: 12 |
114 |
| - - uses: actions/checkout@v2 |
115 |
| - - run: bash ./scripts/ci.sh |
| 115 | + - uses: actions/setup-node@v1 |
| 116 | + with: |
| 117 | + node-version: 12 |
| 118 | + - uses: actions/checkout@v2 |
| 119 | + - run: bash ./scripts/ci.sh |
116 | 120 | eth2:
|
117 |
| - runs-on: ubuntu-latest |
118 |
| - strategy: |
119 |
| - matrix: |
120 |
| - node: [10, 11, 12, 13] |
| 121 | + runs-on: ubuntu-latest |
| 122 | + strategy: |
| 123 | + matrix: |
| 124 | + node: [10, 11, 12, 13] |
121 | 125 | env:
|
122 |
| - TEST: "eth2" |
| 126 | + TEST: "eth2" |
123 | 127 | steps:
|
124 |
| - - uses: actions/setup-node@v1 |
125 |
| - with: |
126 |
| - node-version: ${{ matrix.node }} |
| 128 | + - uses: actions/setup-node@v1 |
| 129 | + with: |
| 130 | + node-version: ${{ matrix.node }} |
127 | 131 |
|
128 |
| - - uses: actions/checkout@v2 |
| 132 | + - uses: actions/checkout@v2 |
129 | 133 |
|
130 |
| - - uses: actions/cache@v2 |
131 |
| - id: cache-deps |
132 |
| - with: |
133 |
| - path: | |
134 |
| - node_modules |
135 |
| - */*/node_modules |
136 |
| - key: ${{ runner.os }}-node${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }} |
| 134 | + - uses: actions/cache@v2 |
| 135 | + id: cache-deps |
| 136 | + with: |
| 137 | + path: | |
| 138 | + node_modules |
| 139 | + */*/node_modules |
| 140 | + key: ${{ runner.os }}-node${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }} |
137 | 141 |
|
138 |
| - - run: npm ci |
139 |
| - if: steps.cache-deps.outputs.cache-hit != 'true' |
| 142 | + - run: npm ci |
| 143 | + if: steps.cache-deps.outputs.cache-hit != 'true' |
140 | 144 |
|
141 |
| - - run: bash ./scripts/ci.sh |
| 145 | + - run: bash ./scripts/ci.sh |
0 commit comments