|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - master |
| 7 | + - 'v*' |
| 8 | + pull_request: {} |
| 9 | + schedule: |
| 10 | + - cron: '0 3 * * *' # daily, at 3am |
| 11 | + |
| 12 | +jobs: |
| 13 | + lint: |
| 14 | + name: Linting |
| 15 | + runs-on: ubuntu-latest |
| 16 | + |
| 17 | + steps: |
| 18 | + - uses: actions/checkout@v1 |
| 19 | + - uses: actions/setup-node@v1 |
| 20 | + with: |
| 21 | + node-version: 12.x |
| 22 | + |
| 23 | + - name: get yarn cache dir |
| 24 | + id: yarn-cache |
| 25 | + run: echo "::set-output name=dir::$(yarn cache dir)" |
| 26 | + |
| 27 | + - uses: actions/cache@v1 |
| 28 | + with: |
| 29 | + path: ${{ steps.yarn-cache.outputs.dir }} |
| 30 | + key: ${{ runner.os }}-yarn-lint-${{ hashFiles('**/yarn.lock') }} |
| 31 | + restore-keys: | |
| 32 | + ${{ runner.os }}-yarn- |
| 33 | +
|
| 34 | + - name: install dependencies |
| 35 | + run: yarn install |
| 36 | + |
| 37 | + - name: lint |
| 38 | + run: yarn lint |
| 39 | + |
| 40 | + test: |
| 41 | + name: Node Tests |
| 42 | + runs-on: ${{ matrix.os }} |
| 43 | + |
| 44 | + strategy: |
| 45 | + matrix: |
| 46 | + os: [ubuntu-latest] |
| 47 | + node-version: [8.x, 10.x, 12.x] |
| 48 | + |
| 49 | + steps: |
| 50 | + - uses: actions/checkout@v1 |
| 51 | + - uses: actions/setup-node@v1 |
| 52 | + with: |
| 53 | + node-version: ${{ matrix.node-version }} |
| 54 | + |
| 55 | + - name: get yarn cache dir |
| 56 | + id: yarn-cache |
| 57 | + run: echo "::set-output name=dir::$(yarn cache dir)" |
| 58 | + |
| 59 | + - uses: actions/cache@v1 |
| 60 | + with: |
| 61 | + path: ${{ steps.yarn-cache.outputs.dir }} |
| 62 | + key: ${{ runner.os }}-yarn-test-${{ hashFiles('**/yarn.lock') }} |
| 63 | + restore-keys: | |
| 64 | + ${{ runner.os }}-yarn- |
| 65 | +
|
| 66 | + - name: install dependencies |
| 67 | + run: yarn install |
| 68 | + |
| 69 | + - name: node tests |
| 70 | + run: yarn test:node |
| 71 | + |
| 72 | + ember-try-scenarios: |
| 73 | + name: Ember Tests (${{ matrix.test-suite }}) |
| 74 | + |
| 75 | + runs-on: ubuntu-latest |
| 76 | + |
| 77 | + strategy: |
| 78 | + matrix: |
| 79 | + test-suite: |
| 80 | + - test:strip |
| 81 | + - test:keep |
| 82 | + |
| 83 | + steps: |
| 84 | + - uses: actions/checkout@v1 |
| 85 | + - uses: actions/setup-node@v1 |
| 86 | + with: |
| 87 | + node-version: 12.x |
| 88 | + |
| 89 | + - name: get yarn cache dir |
| 90 | + id: yarn-cache |
| 91 | + run: echo "::set-output name=dir::$(yarn cache dir)" |
| 92 | + |
| 93 | + - uses: actions/cache@v1 |
| 94 | + with: |
| 95 | + path: ${{ steps.yarn-cache.outputs.dir }} |
| 96 | + key: ${{ runner.os }}-yarn-ember-try-${{ matrix.test-suite }}-${{ hashFiles('**/yarn.lock') }} |
| 97 | + restore-keys: | |
| 98 | + ${{ runner.os }}-yarn- |
| 99 | +
|
| 100 | + - name: install dependencies |
| 101 | + run: yarn install |
| 102 | + |
| 103 | + - name: test |
| 104 | + env: |
| 105 | + TEST_SUITE: ${{ matrix.test-suite }} |
| 106 | + run: yarn test:all --skip-cleanup |
0 commit comments