|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + push: |
| 6 | + # Filtering branches here prevents duplicate builds from pull_request and push |
| 7 | + branches: |
| 8 | + - master |
| 9 | + - beta |
| 10 | + - 'v*' |
| 11 | + - /^greenkeeper.*$/ |
| 12 | + |
| 13 | + # Always run CI for tags |
| 14 | + tags: |
| 15 | + - '*' |
| 16 | + |
| 17 | + # Early issue detection: run CI weekly on Sundays |
| 18 | + schedule: |
| 19 | + - cron: '0 6 * * 0' |
| 20 | + |
| 21 | +jobs: |
| 22 | + test-all-packages: |
| 23 | + name: Ember Tests |
| 24 | + runs-on: ${{ matrix.os }} |
| 25 | + |
| 26 | + strategy: |
| 27 | + matrix: |
| 28 | + node-version: [14.x, 12.x, 10.x] |
| 29 | + os: [ubuntu-latest, windows-latest] |
| 30 | + |
| 31 | + steps: |
| 32 | + - name: Checkout Code |
| 33 | + uses: actions/checkout@v2 |
| 34 | + - name: Use Node.js ${{ matrix.node-version }} |
| 35 | + uses: actions/setup-node@v1 |
| 36 | + with: |
| 37 | + node-version: ${{ matrix.node-version }} |
| 38 | + - name: Yarn Install |
| 39 | + run: yarn install --ignore-engines --frozen-lockfile |
| 40 | + - name: Run ember-cli-fastboot Tests |
| 41 | + run: yarn workspace ember-cli-fastboot test:ember |
| 42 | + - name: Run fastboot Tests |
| 43 | + if: ${{ matrix.os != 'windows-latest' }} |
| 44 | + run: yarn workspace fastboot test |
| 45 | + - name: Run fastboot-express-middleware Tests |
| 46 | + run: yarn workspace fastboot-express-middleware test |
| 47 | + - name: Run fastboot-app-server Tests |
| 48 | + run: yarn workspace fastboot-app-server test:mocha |
| 49 | + |
| 50 | + integration-tests: |
| 51 | + name: Integration Tests |
| 52 | + runs-on: ${{ matrix.os }} |
| 53 | + |
| 54 | + strategy: |
| 55 | + matrix: |
| 56 | + node-version: [14.x, 12.x, 10.x] |
| 57 | + os: [ubuntu-latest, windows-latest] |
| 58 | + |
| 59 | + steps: |
| 60 | + - name: Checkout Code |
| 61 | + uses: actions/checkout@v2 |
| 62 | + - name: Use Node.js ${{ matrix.node-version }} |
| 63 | + uses: actions/setup-node@v1 |
| 64 | + with: |
| 65 | + node-version: ${{ matrix.node-version }} |
| 66 | + - name: Yarn Install |
| 67 | + run: yarn install --ignore-engines --frozen-lockfile |
| 68 | + - name: Integration Tests |
| 69 | + run: yarn workspace integration-tests test |
| 70 | + |
| 71 | + test-packages: |
| 72 | + name: Test Packages |
| 73 | + runs-on: ${{ matrix.os }} |
| 74 | + |
| 75 | + strategy: |
| 76 | + matrix: |
| 77 | + node-version: [14.x, 12.x, 10.x] |
| 78 | + os: [ubuntu-latest, windows-latest] |
| 79 | + |
| 80 | + steps: |
| 81 | + - name: Checkout Code |
| 82 | + uses: actions/checkout@v2 |
| 83 | + - name: Use Node.js ${{ matrix.node-version }} |
| 84 | + uses: actions/setup-node@v1 |
| 85 | + with: |
| 86 | + node-version: ${{ matrix.node-version }} |
| 87 | + - name: Yarn Install |
| 88 | + run: yarn install --ignore-engines --frozen-lockfile |
| 89 | + - name: Basic App |
| 90 | + run: yarn workspace basic-app test:mocha |
| 91 | + - name: Custom App |
| 92 | + run: yarn workspace custom-fastboot-app test:mocha |
| 93 | + - name: Run ember-cli-fastboot-testing-app Tests |
| 94 | + run: yarn workspace ember-cli-fastboot-testing-app test:ember |
| 95 | + |
| 96 | + test-legacy-mocha: |
| 97 | + name: Legacy Mocha Tests - ${{ matrix.node-version }} |
| 98 | + runs-on: ubuntu-latest |
| 99 | + |
| 100 | + strategy: |
| 101 | + fail-fast: false |
| 102 | + matrix: |
| 103 | + node-version: ['14', '12', '10'] |
| 104 | + |
| 105 | + steps: |
| 106 | + - name: Checkout Code |
| 107 | + uses: actions/checkout@v2 |
| 108 | + - name: Use Node.js ${{ matrix.node-version }} |
| 109 | + uses: volta-cli/action@v1 |
| 110 | + with: |
| 111 | + node-version: ${{ matrix.node-version }} |
| 112 | + |
| 113 | + # Remove test-packages folder so that we don't leak node_modules between apps |
| 114 | + - name: Remove test-packages |
| 115 | + run: | |
| 116 | + rm -rf test-packages |
| 117 | + - name: Yarn Install |
| 118 | + working-directory: ./packages/ember-cli-fastboot |
| 119 | + run: | |
| 120 | + yarn install --ignore-engines --frozen-lockfile |
| 121 | + - name: Run Mocha Tests |
| 122 | + working-directory: ./packages/ember-cli-fastboot |
| 123 | + run: | |
| 124 | + npm --version |
| 125 | + yarn test:mocha |
0 commit comments