|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - master |
| 7 | + pull_request: {} |
| 8 | + schedule: |
| 9 | + - cron: '0 3 * * *' # daily, at 3am |
| 10 | + |
| 11 | +jobs: |
| 12 | + test: |
| 13 | + name: Tests |
| 14 | + |
| 15 | + runs-on: ${{ matrix.os }} |
| 16 | + |
| 17 | + strategy: |
| 18 | + matrix: |
| 19 | + os: [ubuntu-latest, macos-latest, windows-latest] |
| 20 | + |
| 21 | + steps: |
| 22 | + - if: matrix.os == 'macos-latest' |
| 23 | + run: | |
| 24 | + brew update |
| 25 | + brew cask install google-chrome |
| 26 | + - uses: actions/checkout@v1 |
| 27 | + - uses: actions/setup-node@v1 |
| 28 | + with: |
| 29 | + node-version: 8.x |
| 30 | + - name: get yarn cache dir |
| 31 | + id: yarn-cache |
| 32 | + run: echo "::set-output name=dir::$(yarn cache dir)" |
| 33 | + - uses: actions/cache@v1 |
| 34 | + with: |
| 35 | + path: ${{ steps.yarn-cache.outputs.dir }} |
| 36 | + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} |
| 37 | + restore-keys: | |
| 38 | + ${{ runner.os }}-yarn- |
| 39 | + - name: install dependencies |
| 40 | + run: yarn install --frozen-lockfile --ignore-engines |
| 41 | + - name: lint |
| 42 | + if: matrix.os != 'windows-latest' |
| 43 | + run: yarn lint:js |
| 44 | + - name: test |
| 45 | + run: yarn test && yarn test:node |
| 46 | + |
| 47 | + floating-dependencies: |
| 48 | + name: Floating Dependencies |
| 49 | + |
| 50 | + runs-on: ubuntu-latest |
| 51 | + |
| 52 | + needs: test |
| 53 | + |
| 54 | + steps: |
| 55 | + - uses: actions/checkout@v1 |
| 56 | + - uses: actions/setup-node@v1 |
| 57 | + with: |
| 58 | + node-version: 8.x |
| 59 | + - name: get yarn cache dir |
| 60 | + id: yarn-cache |
| 61 | + run: echo "::set-output name=dir::$(yarn cache dir)" |
| 62 | + - uses: actions/cache@v1 |
| 63 | + with: |
| 64 | + path: ${{ steps.yarn-cache.outputs.dir }} |
| 65 | + key: ${{ runner.os }}-yarn-floating-dependencies-${{ hashFiles('**/yarn.lock') }} |
| 66 | + restore-keys: | |
| 67 | + ${{ runner.os }}-yarn- |
| 68 | + - name: install dependencies |
| 69 | + run: yarn install --no-lockfile |
| 70 | + - run: yarn test |
| 71 | + |
| 72 | + ember-try-scenarios: |
| 73 | + name: ${{ matrix.ember-try-scenario }} |
| 74 | + |
| 75 | + runs-on: ubuntu-latest |
| 76 | + |
| 77 | + needs: [test, floating-dependencies] |
| 78 | + |
| 79 | + strategy: |
| 80 | + fail-fast: true |
| 81 | + matrix: |
| 82 | + ember-try-scenario: |
| 83 | + - ember-lts-3.4 |
| 84 | + - ember-lts-3.8 |
| 85 | + - ember-lts-3.12 |
| 86 | + - ember-release |
| 87 | + - ember-beta |
| 88 | + - ember-canary |
| 89 | + - ember-default |
| 90 | + - ember-default-with-jquery |
| 91 | + |
| 92 | + steps: |
| 93 | + - uses: actions/checkout@v1 |
| 94 | + - uses: actions/setup-node@v1 |
| 95 | + with: |
| 96 | + node-version: 8.x |
| 97 | + - name: get yarn cache dir |
| 98 | + id: yarn-cache |
| 99 | + run: echo "::set-output name=dir::$(yarn cache dir)" |
| 100 | + - uses: actions/cache@v1 |
| 101 | + with: |
| 102 | + path: ${{ steps.yarn-cache.outputs.dir }} |
| 103 | + key: ${{ runner.os }}-yarn-try-scenarios-${{ matrix.ember-try-scenario }}-${{ hashFiles('**/yarn.lock') }} |
| 104 | + restore-keys: | |
| 105 | + ${{ runner.os }}-yarn- |
| 106 | + - name: install dependencies |
| 107 | + run: yarn install |
| 108 | + - name: test |
| 109 | + env: |
| 110 | + EMBER_TRY_SCENARIO: ${{ matrix.ember-try-scenario }} |
| 111 | + run: node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO |
| 112 | + |
0 commit comments