|
| 1 | +name: Qwik CI |
| 2 | +on: [push, pull_request] |
| 3 | + |
| 4 | +jobs: |
| 5 | + build: |
| 6 | + runs-on: ubuntu-latest |
| 7 | + steps: |
| 8 | + - name: Checkout |
| 9 | + uses: actions/checkout@v2 |
| 10 | + |
| 11 | + - name: Setup Install Cache |
| 12 | + uses: c-hive/gha-yarn-cache@v1 |
| 13 | + |
| 14 | + - name: Install Dependencies |
| 15 | + run: yarn install --frozen-lockfile |
| 16 | + |
| 17 | + - name: Build |
| 18 | + run: yarn build |
| 19 | + |
| 20 | + - name: Validate Package |
| 21 | + run: yarn validate |
| 22 | + |
| 23 | + lint: |
| 24 | + runs-on: ubuntu-latest |
| 25 | + steps: |
| 26 | + - name: Checkout |
| 27 | + uses: actions/checkout@v2 |
| 28 | + |
| 29 | + - name: Setup Install Cache |
| 30 | + uses: c-hive/gha-yarn-cache@v1 |
| 31 | + |
| 32 | + - name: Install Dependencies |
| 33 | + run: yarn install --frozen-lockfile |
| 34 | + |
| 35 | + - name: Prettier Check |
| 36 | + run: yarn prettier-check |
| 37 | + |
| 38 | + - name: Lint Check |
| 39 | + run: yarn lint |
| 40 | + |
| 41 | + unit-tests: |
| 42 | + runs-on: ubuntu-latest |
| 43 | + steps: |
| 44 | + - name: Checkout |
| 45 | + uses: actions/checkout@v2 |
| 46 | + |
| 47 | + - name: Setup Install Cache |
| 48 | + uses: c-hive/gha-yarn-cache@v1 |
| 49 | + |
| 50 | + - name: Install Dependencies |
| 51 | + run: yarn install --frozen-lockfile |
| 52 | + |
| 53 | + - name: Unit Tests |
| 54 | + run: | |
| 55 | + yarn build |
| 56 | + yarn test.unit |
| 57 | +
|
| 58 | + e2e-tests: |
| 59 | + timeout-minutes: 15 |
| 60 | + runs-on: ubuntu-latest |
| 61 | + strategy: |
| 62 | + fail-fast: false |
| 63 | + matrix: |
| 64 | + containers: [1, 2, 3, 4] |
| 65 | + steps: |
| 66 | + - name: Checkout |
| 67 | + uses: actions/checkout@v2 |
| 68 | + |
| 69 | + - name: 'E2E Tests' |
| 70 | + uses: cypress-io/github-action@v2 |
| 71 | + with: |
| 72 | + start: yarn integration.server.prod |
| 73 | + wait-on: 'http://localhost:8081' |
| 74 | + wait-on-timeout: 120 |
| 75 | + browser: chrome |
| 76 | + record: true |
| 77 | + parallel: true |
| 78 | + group: 'Qwik E2E Test Group' |
| 79 | + spec: cypress/integration/* |
| 80 | + env: |
| 81 | + CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} |
| 82 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
0 commit comments