|
4 | 4 | push:
|
5 | 5 | branches:
|
6 | 6 | - master
|
7 |
| - tags: |
8 |
| - - v[0-9]+.[0-9]+.[0-9]+ |
| 7 | + - main |
| 8 | + - "v*" |
9 | 9 | pull_request:
|
10 | 10 |
|
11 | 11 | env:
|
12 | 12 | NODE_VERSION: 10
|
13 | 13 | PERCY_PARALLEL_NONCE: ${{ github.run_id }}-${{ github.run_number }}
|
14 | 14 | PERCY_PARALLEL_TOTAL: 1
|
| 15 | + FORCE_COLOR: 1 |
15 | 16 |
|
16 | 17 | jobs:
|
17 | 18 | lint:
|
18 |
| - name: Lint and Test |
| 19 | + name: Linting |
19 | 20 | runs-on: ubuntu-latest
|
20 |
| - timeout-minutes: 3 |
21 |
| - steps: |
22 |
| - - name: Check out a copy of the repo |
23 |
| - uses: actions/checkout@v2 |
24 |
| - |
25 |
| - - uses: mansona/npm-lockfile-version@v1 |
26 | 21 |
|
27 |
| - - name: Use Node.js ${{ env.NODE_VERSION }} |
28 |
| - uses: actions/setup-node@v2-beta |
| 22 | + steps: |
| 23 | + - uses: actions/checkout@v2 |
| 24 | + - uses: actions/setup-node@v2 |
29 | 25 | with:
|
30 | 26 | node-version: ${{ env.NODE_VERSION }}
|
31 | 27 |
|
32 |
| - - name: Cache npm cache and node_modules |
33 |
| - id: cache-dependencies |
34 |
| - uses: actions/cache@v2 |
35 |
| - with: |
36 |
| - path: | |
37 |
| - ~/.npm |
38 |
| - node_modules |
39 |
| - key: ${{ runner.os }}-${{ env.NODE_VERSION }}-${{ hashFiles('**/package-lock.json') }} |
40 |
| - restore-keys: ${{ runner.os }}-${{ env.NODE_VERSION }}- |
| 28 | + - run: npm i -g npm@7 |
| 29 | + - run: npm ci |
| 30 | + - run: npm run lint |
41 | 31 |
|
42 |
| - - name: Install dependencies |
43 |
| - run: npm install |
44 |
| - if: steps.cache-dependencies.outputs.cache-hit != 'true' |
45 |
| - |
46 |
| - - name: Lint |
47 |
| - run: npm run lint |
| 32 | + floating-dependencies: |
| 33 | + name: Floating Dependencies |
| 34 | + runs-on: ubuntu-latest |
48 | 35 |
|
49 |
| - - name: Test |
50 |
| - uses: percy/exec-action@v0.3.1 |
| 36 | + steps: |
| 37 | + - uses: actions/checkout@v2 |
| 38 | + - uses: actions/setup-node@v2 |
51 | 39 | with:
|
52 |
| - custom-command: npm run test:ember |
53 |
| - env: |
54 |
| - PERCY_PARALLEL_NONCE: ${{ env.PERCY_PARALLEL_NONCE }} |
55 |
| - PERCY_PARALLEL_TOTAL: ${{ env.PERCY_PARALLEL_TOTAL }} |
56 |
| - PERCY_TOKEN: ee0a9d5c1122d6a21852edf19b5b309aaec18077fb3900c98995c90bc48ed240 |
| 40 | + node-version: ${{ env.NODE_VERSION }} |
57 | 41 |
|
| 42 | + - run: npm i -g npm@7 |
| 43 | + - run: npm install --no-package-lock |
| 44 | + - run: npm test |
58 | 45 |
|
59 |
| - test-addon-floating: |
60 |
| - name: Test addon (floating dependencies) |
| 46 | + test: |
| 47 | + name: Tests |
61 | 48 | runs-on: ubuntu-latest
|
62 |
| - timeout-minutes: 5 |
63 |
| - steps: |
64 |
| - - name: Check out a copy of the repo |
65 |
| - uses: actions/checkout@v2 |
| 49 | + env: |
| 50 | + PERCY_TOKEN: ee0a9d5c1122d6a21852edf19b5b309aaec18077fb3900c98995c90bc48ed240 |
| 51 | + RUN_PERCY_TESTS: true |
| 52 | + |
66 | 53 |
|
67 |
| - - name: Use Node.js ${{ env.NODE_VERSION }} |
68 |
| - uses: actions/setup-node@v2-beta |
| 54 | + steps: |
| 55 | + - uses: actions/checkout@v2 |
| 56 | + - uses: mansona/npm-lockfile-version@v1 |
| 57 | + - uses: actions/setup-node@v2 |
69 | 58 | with:
|
70 | 59 | node-version: ${{ env.NODE_VERSION }}
|
71 | 60 |
|
72 |
| - - name: Install dependencies |
73 |
| - run: npm install --no-package-lock |
74 |
| - |
75 |
| - - name: Test |
76 |
| - run: npm run test:ember |
| 61 | + - run: npm i -g npm@7 |
| 62 | + - run: npm ci |
| 63 | + - run: npx percy exec -- npm run test |
77 | 64 |
|
78 |
| - test-compatibility: |
79 |
| - name: Test compatibility |
| 65 | + try-scenarios: |
| 66 | + name: "ember-try: ${{ matrix.ember-try-scenario }}" |
80 | 67 | runs-on: ubuntu-latest
|
| 68 | + timeout-minutes: 10 |
| 69 | + needs: test |
| 70 | + |
81 | 71 | strategy:
|
82 |
| - fail-fast: true |
83 | 72 | matrix:
|
84 |
| - scenario: |
| 73 | + ember-try-scenario: |
85 | 74 | - 'ember-lts-3.16'
|
86 | 75 | - 'ember-lts-3.20'
|
87 | 76 | - 'ember-release'
|
88 | 77 | - 'ember-beta'
|
89 | 78 | - 'ember-canary'
|
90 | 79 | - 'ember-default-with-jquery'
|
91 | 80 | - 'ember-classic'
|
92 |
| - timeout-minutes: 7 |
93 |
| - steps: |
94 |
| - - name: Check out a copy of the repo |
95 |
| - uses: actions/checkout@v2 |
96 | 81 |
|
97 |
| - - name: Use Node.js ${{ env.NODE_VERSION }} |
98 |
| - uses: actions/setup-node@v2-beta |
| 82 | + steps: |
| 83 | + - uses: actions/checkout@v2 |
| 84 | + - uses: actions/setup-node@v2 |
99 | 85 | with:
|
100 | 86 | node-version: ${{ env.NODE_VERSION }}
|
101 | 87 |
|
102 |
| - - name: Cache npm cache and node_modules |
103 |
| - id: cache-dependencies |
104 |
| - uses: actions/cache@v2 |
105 |
| - with: |
106 |
| - path: | |
107 |
| - ~/.npm |
108 |
| - node_modules |
109 |
| - key: ${{ runner.os }}-${{ env.NODE_VERSION }}-${{ matrix.scenario }}-${{ hashFiles('**/package-lock.json') }} |
110 |
| - restore-keys: ${{ runner.os }}-${{ env.NODE_VERSION }}-${{ matrix.scenario }}- |
111 |
| - |
112 |
| - - name: Install dependencies |
113 |
| - run: npm install |
114 |
| - if: steps.cache-dependencies.outputs.cache-hit != 'true' |
115 |
| - |
116 |
| - - name: Test |
117 |
| - run: npx ember try:one $EMBER_TRY_SCENARIO ${{ matrix.scenario }} |
| 88 | + - run: npm i -g npm@7 |
| 89 | + - run: npm ci |
| 90 | + - name: test |
| 91 | + run: node_modules/.bin/ember try:one ${{ matrix.ember-try-scenario }} --skip-cleanup |
0 commit comments