|
| 1 | +# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node |
| 2 | +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions |
| 3 | + |
| 4 | +name: CI |
| 5 | + |
| 6 | +on: |
| 7 | + push: |
| 8 | + branches: [master] |
| 9 | + pull_request: |
| 10 | + branches: [master] |
| 11 | + |
| 12 | +env: |
| 13 | + CC_TEST_REPORTER_ID: 3c17d30a957d0b5f06d932c3dd8ce9354df2b8d7769710d8827e6261445839d8 |
| 14 | + |
| 15 | +concurrency: |
| 16 | + group: ci-${{ github.head_ref || github.ref }} |
| 17 | + cancel-in-progress: true |
| 18 | + |
| 19 | +jobs: |
| 20 | + test: |
| 21 | + name: "Tests" |
| 22 | + runs-on: ubuntu-latest |
| 23 | + |
| 24 | + steps: |
| 25 | + - uses: actions/checkout@v2 |
| 26 | + - name: Install Node |
| 27 | + uses: actions/setup-node@v2 |
| 28 | + with: |
| 29 | + node-version: 12.x |
| 30 | + cache: npm |
| 31 | + - name: Install Dependencies |
| 32 | + run: npm ci |
| 33 | + - name: Lint |
| 34 | + run: npm run lint |
| 35 | + - name: Run Tests |
| 36 | + run: npm run test:ember |
| 37 | + |
| 38 | + floating: |
| 39 | + name: "Floating Dependencies" |
| 40 | + runs-on: ubuntu-latest |
| 41 | + |
| 42 | + steps: |
| 43 | + - uses: actions/checkout@v2 |
| 44 | + - uses: actions/setup-node@v2 |
| 45 | + with: |
| 46 | + node-version: 12.x |
| 47 | + cache: npm |
| 48 | + - name: Install Dependencies |
| 49 | + run: npm install --no-shrinkwrap |
| 50 | + - name: Run Tests |
| 51 | + run: npm run test:ember |
| 52 | + |
| 53 | + try-scenarios: |
| 54 | + name: ${{ matrix.try-scenario }} |
| 55 | + runs-on: ubuntu-latest |
| 56 | + continue-on-error: ${{ matrix.experimental }} |
| 57 | + needs: "test" |
| 58 | + |
| 59 | + strategy: |
| 60 | + fail-fast: false |
| 61 | + matrix: |
| 62 | + try-scenario: |
| 63 | + - ember-lts-3.24 |
| 64 | + - ember-lts-3.28 |
| 65 | + - ember-beta |
| 66 | + - ember-classic |
| 67 | + - ember-default-with-jquery |
| 68 | + - embroider-safe |
| 69 | + - embroider-optimized |
| 70 | + experimental: [false] |
| 71 | + coverage: [false] |
| 72 | + include: |
| 73 | + - try-scenario: ember-canary |
| 74 | + experimental: true |
| 75 | + coverage: false |
| 76 | + - try-scenario: ember-release |
| 77 | + experimental: false |
| 78 | + coverage: true |
| 79 | + |
| 80 | + steps: |
| 81 | + - uses: actions/checkout@v2 |
| 82 | + - name: Install Node |
| 83 | + uses: actions/setup-node@v2 |
| 84 | + with: |
| 85 | + node-version: 12.x |
| 86 | + cache: npm |
| 87 | + - name: Install Dependencies |
| 88 | + run: npm ci |
| 89 | + - name: Run Tests |
| 90 | + run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }} |
| 91 | + # only run coverage under specific scenarios |
| 92 | + - name: Coverage |
| 93 | + if: ${{ matrix.coverage && github.ref == 'refs/heads/master' }} |
| 94 | + run: | |
| 95 | + npm ci |
| 96 | + COVERAGE=true node_modules/.bin/ember try:one ${{ matrix.try-scenario }} |
| 97 | + curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter |
| 98 | + chmod +x ./cc-test-reporter |
| 99 | + ./cc-test-reporter format-coverage -t lcov -o coverage/codeclimate.json coverage/lcov.info |
| 100 | + ./cc-test-reporter upload-coverage |
0 commit comments