|
| 1 | +# Copyright 2024 Docker Inc. |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | + |
| 15 | +name: E2E tests |
| 16 | + |
| 17 | +on: |
| 18 | + push: |
| 19 | + branches: |
| 20 | + - main |
| 21 | + pull_request: |
| 22 | + |
| 23 | +jobs: |
| 24 | + e2e: |
| 25 | + name: Run E2E tests |
| 26 | + runs-on: ubuntu-latest |
| 27 | + |
| 28 | + steps: |
| 29 | + - uses: actions/checkout@v3 |
| 30 | + |
| 31 | + - name: Install and start Docker Desktop |
| 32 | + uses: docker/desktop-action/start@v0.3.6 |
| 33 | + |
| 34 | + - name: Change Desktop settings and allow installing non marketplace extensions |
| 35 | + run: | |
| 36 | + jq '.onlyMarketplaceExtensions|=false' ~/.docker/desktop/settings.json >./new-settings.json |
| 37 | + mv -f ./new-settings.json ~/.docker/desktop/settings.json |
| 38 | +
|
| 39 | + - name: Build extension |
| 40 | + run: | |
| 41 | + make build-extension |
| 42 | +
|
| 43 | + - name: Kill Mono process running on port 8084 to unblock it # https://github.com/actions/runner-images/issues/2821 |
| 44 | + shell: bash |
| 45 | + run: | |
| 46 | + sudo fuser -k -n tcp 8084 |
| 47 | + - name: Enable corepack |
| 48 | + run: corepack enable |
| 49 | + - uses: actions/setup-node@v4 |
| 50 | + with: |
| 51 | + node-version: "20" |
| 52 | + - name: Run E2E tests |
| 53 | + env: |
| 54 | + SKIP_EXTENSION_IMAGE_BUILD: true |
| 55 | + run: | |
| 56 | + cd e2e/electron |
| 57 | + yarn install |
| 58 | + xvfb-run --auto-servernum --server-args="-screen 0 1920x1080x24" -- yarn test:e2e |
0 commit comments