|
| 1 | +name: e2e |
| 2 | +on: |
| 3 | + push: |
| 4 | + branches: |
| 5 | + - main |
| 6 | + pull_request: |
| 7 | + |
| 8 | +concurrency: |
| 9 | + # Cancel any running workflow for the same branch when new commits are pushed. |
| 10 | + # We group both by ref_name (available when CI is triggered by a push to a branch/tag) |
| 11 | + # and head_ref (available when CI is triggered by a PR). |
| 12 | + group: "e2e-${{ github.ref_name }}-${{ github.head_ref }}" |
| 13 | + cancel-in-progress: true |
| 14 | + |
| 15 | +jobs: |
| 16 | + regular-path: |
| 17 | + runs-on: ubuntu-latest |
| 18 | + steps: |
| 19 | + - name: Checkout code |
| 20 | + uses: actions/checkout@v3 |
| 21 | + - uses: actions/setup-node@v3 |
| 22 | + with: |
| 23 | + node-version: 18.15.0 |
| 24 | + cache: yarn |
| 25 | + - name: Install Go |
| 26 | + uses: actions/setup-go@v4 |
| 27 | + with: |
| 28 | + go-version: "1.19.9" |
| 29 | + cache: true |
| 30 | + - run: yarn --frozen-lockfile |
| 31 | + - run: make build |
| 32 | + - name: Cypress run |
| 33 | + uses: cypress-io/github-action@v5 |
| 34 | + with: |
| 35 | + wait-on: http://localhost:4100/ui/ |
| 36 | + start: make run |
| 37 | + config-file: cypress/ci.ts |
| 38 | + env: |
| 39 | + ELECTRON_ENABLE_LOGGING: 1 |
| 40 | + - uses: actions/upload-artifact@v2 |
| 41 | + if: always() |
| 42 | + with: |
| 43 | + name: regular-path-cypress-screenshots |
| 44 | + path: cypress/screenshots |
| 45 | + |
| 46 | + base-path: |
| 47 | + runs-on: ubuntu-latest |
| 48 | + steps: |
| 49 | + - name: Checkout code |
| 50 | + uses: actions/checkout@v3 |
| 51 | + - uses: actions/setup-node@v3 |
| 52 | + with: |
| 53 | + node-version: 18.15.0 |
| 54 | + cache: yarn |
| 55 | + - name: Install Go |
| 56 | + uses: actions/setup-go@v4 |
| 57 | + with: |
| 58 | + go-version: "1.19.9" |
| 59 | + cache: true |
| 60 | + - run: yarn --frozen-lockfile |
| 61 | + - run: make build |
| 62 | + - name: run nginx with /foobar/ |
| 63 | + run: docker-compose -f scripts/base-url/docker-compose.yaml up -d |
| 64 | + - name: Cypress run |
| 65 | + uses: cypress-io/github-action@v5 |
| 66 | + with: |
| 67 | + wait-on: http://localhost:8080/foobar/ |
| 68 | + start: | |
| 69 | + make run PARAMS=-api.base-url=/foobar/ |
| 70 | + config-file: cypress/ci-base-path.ts |
| 71 | + env: |
| 72 | + ELECTRON_ENABLE_LOGGING: 1 |
| 73 | + - uses: actions/upload-artifact@v2 |
| 74 | + if: always() |
| 75 | + with: |
| 76 | + name: base-path-cypress-screenshots |
| 77 | + path: cypress/screenshots |
0 commit comments