|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - master |
| 7 | + pull_request: |
| 8 | + |
| 9 | +jobs: |
| 10 | + lint: |
| 11 | + name: Lint |
| 12 | + runs-on: ubuntu-latest |
| 13 | + steps: |
| 14 | + - uses: actions/checkout@v2 |
| 15 | + with: |
| 16 | + fetch-depth: 1 |
| 17 | + - uses: actions/setup-node@v2-beta |
| 18 | + with: |
| 19 | + node-version: '10.x' |
| 20 | + - name: Get package manager's global cache path |
| 21 | + id: global-cache-dir-path |
| 22 | + run: echo "::set-output name=dir::$(yarn cache dir)" |
| 23 | + - name: Cache package manager's global cache |
| 24 | + id: cache-global-package-manager-cache |
| 25 | + uses: actions/cache@v1 |
| 26 | + with: |
| 27 | + path: ${{ steps.global-cache-dir-path.outputs.dir }} |
| 28 | + key: ${{ runner.os }}-${{ matrix.node-version }}-yarn.lock-${{ hashFiles('**/yarn.lock') }} |
| 29 | + restore-keys: | |
| 30 | + ${{ runner.os }}-${{ matrix.node-version }}-yarn.lock- |
| 31 | + - name: Cache node_modules |
| 32 | + id: cache-node-modules |
| 33 | + uses: actions/cache@v1 |
| 34 | + with: |
| 35 | + path: node_modules |
| 36 | + key: ${{ runner.os }}-${{ matrix.node-version }}-nodemodules-${{ hashFiles('**/yarn.lock') }} |
| 37 | + restore-keys: | |
| 38 | + ${{ runner.os }}-${{ matrix.node-version }}-nodemodules- |
| 39 | + - name: Install Dependencies |
| 40 | + run: yarn install --frozen-lockfile |
| 41 | + if: | |
| 42 | + steps.cache-global-package-manager-cache.outputs.cache-hit != 'true' || |
| 43 | + steps.cache-node-modules.outputs.cache-hit != 'true' |
| 44 | + - name: Lint |
| 45 | + run: yarn lint |
| 46 | + |
| 47 | + test: |
| 48 | + name: Tests |
| 49 | + runs-on: ${{ matrix.os }} |
| 50 | + needs: lint |
| 51 | + |
| 52 | + strategy: |
| 53 | + matrix: |
| 54 | + os: [ubuntu-latest] |
| 55 | + browser: [chrome] |
| 56 | + |
| 57 | + steps: |
| 58 | + - uses: actions/checkout@v2 |
| 59 | + with: |
| 60 | + fetch-depth: 1 |
| 61 | + - uses: actions/setup-node@v2-beta |
| 62 | + with: |
| 63 | + node-version: '10.x' |
| 64 | + - name: Get package manager's global cache path |
| 65 | + id: global-cache-dir-path |
| 66 | + run: echo "::set-output name=dir::$(yarn cache dir)" |
| 67 | + - name: Cache package manager's global cache |
| 68 | + id: cache-global-package-manager-cache |
| 69 | + uses: actions/cache@v1 |
| 70 | + with: |
| 71 | + path: ${{ steps.global-cache-dir-path.outputs.dir }} |
| 72 | + key: ${{ runner.os }}-${{ matrix.node-version }}-yarn.lock-${{ hashFiles('**/yarn.lock') }} |
| 73 | + restore-keys: | |
| 74 | + ${{ runner.os }}-${{ matrix.node-version }}-yarn.lock- |
| 75 | + - name: Cache node_modules |
| 76 | + id: cache-node-modules |
| 77 | + uses: actions/cache@v1 |
| 78 | + with: |
| 79 | + path: node_modules |
| 80 | + key: ${{ runner.os }}-${{ matrix.node-version }}-nodemodules-${{ hashFiles('**/yarn.lock') }} |
| 81 | + restore-keys: | |
| 82 | + ${{ runner.os }}-${{ matrix.node-version }}-nodemodules- |
| 83 | + - name: Install Dependencies |
| 84 | + run: yarn install --frozen-lockfile |
| 85 | + if: | |
| 86 | + steps.cache-global-package-manager-cache.outputs.cache-hit != 'true' || |
| 87 | + steps.cache-node-modules.outputs.cache-hit != 'true' |
| 88 | + - name: Test |
| 89 | + run: yarn test:ember --launch ${{ matrix.browser }} |
| 90 | + |
| 91 | + floating-dependencies: |
| 92 | + name: Floating Dependencies |
| 93 | + runs-on: ${{ matrix.os }} |
| 94 | + needs: lint |
| 95 | + |
| 96 | + strategy: |
| 97 | + matrix: |
| 98 | + os: [ubuntu-latest] |
| 99 | + browser: [chrome] |
| 100 | + |
| 101 | + steps: |
| 102 | + - uses: actions/checkout@v2 |
| 103 | + with: |
| 104 | + fetch-depth: 1 |
| 105 | + - uses: actions/setup-node@v2-beta |
| 106 | + with: |
| 107 | + node-version: '10.x' |
| 108 | + - name: Get package manager's global cache path |
| 109 | + id: global-cache-dir-path |
| 110 | + run: echo "::set-output name=dir::$(yarn cache dir)" |
| 111 | + - name: Cache package manager's global cache |
| 112 | + id: cache-global-package-manager-cache |
| 113 | + uses: actions/cache@v1 |
| 114 | + with: |
| 115 | + path: ${{ steps.global-cache-dir-path.outputs.dir }} |
| 116 | + key: ${{ runner.os }}-${{ matrix.node-version }}-yarn.lock-${{ hashFiles('**/yarn.lock') }} |
| 117 | + restore-keys: | |
| 118 | + ${{ runner.os }}-${{ matrix.node-version }}-yarn.lock- |
| 119 | + - name: Cache node_modules |
| 120 | + id: cache-node-modules |
| 121 | + uses: actions/cache@v1 |
| 122 | + with: |
| 123 | + path: node_modules |
| 124 | + key: ${{ runner.os }}-${{ matrix.node-version }}-nodemodules-${{ hashFiles('**/yarn.lock') }} |
| 125 | + restore-keys: | |
| 126 | + ${{ runner.os }}-${{ matrix.node-version }}-nodemodules- |
| 127 | + - name: Install Dependencies |
| 128 | + run: yarn install --frozen-lockfile |
| 129 | + if: | |
| 130 | + steps.cache-global-package-manager-cache.outputs.cache-hit != 'true' || |
| 131 | + steps.cache-node-modules.outputs.cache-hit != 'true' |
| 132 | + - name: Test |
| 133 | + run: yarn test:ember --launch ${{ matrix.browser }} |
| 134 | + |
| 135 | + try-scenarios: |
| 136 | + name: Tests - ${{ matrix.ember-try-scenario }} |
| 137 | + runs-on: ubuntu-latest |
| 138 | + continue-on-error: ${{ matrix.allow-failure }} |
| 139 | + needs: test |
| 140 | + |
| 141 | + strategy: |
| 142 | + fail-fast: true |
| 143 | + matrix: |
| 144 | + ember-try-scenario: [ |
| 145 | + ember-lts-3.16, |
| 146 | + ember-release, |
| 147 | + ember-beta, |
| 148 | + ember-default-with-jquery, |
| 149 | + ember-classic |
| 150 | + ] |
| 151 | + allow-failure: [false] |
| 152 | + include: |
| 153 | + - ember-try-scenario: ember-canary |
| 154 | + allow-failure: true |
| 155 | + |
| 156 | + steps: |
| 157 | + - uses: actions/checkout@v2 |
| 158 | + with: |
| 159 | + fetch-depth: 1 |
| 160 | + - uses: actions/setup-node@v2-beta |
| 161 | + with: |
| 162 | + node-version: '10.x' |
| 163 | + - name: Get package manager's global cache path |
| 164 | + id: global-cache-dir-path |
| 165 | + run: echo "::set-output name=dir::$(yarn cache dir)" |
| 166 | + - name: Cache package manager's global cache |
| 167 | + id: cache-global-package-manager-cache |
| 168 | + uses: actions/cache@v1 |
| 169 | + with: |
| 170 | + path: ${{ steps.global-cache-dir-path.outputs.dir }} |
| 171 | + key: ${{ runner.os }}-${{ matrix.node-version }}-yarn.lock-${{ hashFiles('**/yarn.lock') }} |
| 172 | + restore-keys: | |
| 173 | + ${{ runner.os }}-${{ matrix.node-version }}-yarn.lock- |
| 174 | + - name: Cache node_modules |
| 175 | + id: cache-node-modules |
| 176 | + uses: actions/cache@v1 |
| 177 | + with: |
| 178 | + path: node_modules |
| 179 | + key: ${{ runner.os }}-${{ matrix.node-version }}-nodemodules-${{ hashFiles('**/yarn.lock') }} |
| 180 | + restore-keys: | |
| 181 | + ${{ runner.os }}-${{ matrix.node-version }}-nodemodules- |
| 182 | + - name: Install Dependencies |
| 183 | + run: yarn install --frozen-lockfile |
| 184 | + if: | |
| 185 | + steps.cache-global-package-manager-cache.outputs.cache-hit != 'true' || |
| 186 | + steps.cache-node-modules.outputs.cache-hit != 'true' |
| 187 | + - name: Test |
| 188 | + env: |
| 189 | + EMBER_TRY_SCENARIO: ${{ matrix.ember-try-scenario }} |
| 190 | + run: node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO |
0 commit comments