Skip to content

Commit

Permalink
Run UI test in a matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
DavyLandman committed Sep 29, 2023
1 parent 08e7104 commit 2a1d4b6
Showing 1 changed file with 21 additions and 7 deletions.
28 changes: 21 additions & 7 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@ permissions:

jobs:
ui-test:
runs-on: buildjet-4vcpu-ubuntu-2204
strategy:
matrix:
runner: [buildjet-4vcpu-ubuntu-2204, windows-latest, macos-latest]
fail-fast: true
env:
CODE_VERSION: "1.75.1"
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
Expand All @@ -34,8 +40,6 @@ jobs:
- name: Package & compile rascal-lsp
working-directory: ./rascal-lsp
run: mvn -B -Drascal.compile.skip -Drascal.tutor.skip clean package
env:
MAVEN_OPTS: "-Xmx6G"

- name: Package & compile extension
working-directory: ./rascal-vscode-extension
Expand All @@ -48,20 +52,29 @@ jobs:
uses: actions/cache@v3
with:
path: /tmp/uitest
key: "vscode-linux"
key: "vscode-${{matrix.runner}}"

- name: "UI test (windows & mac)"
if: ${{ matrix.runner }} != "buildjet-4vcpu-ubuntu-2204"
working-directory: ./rascal-vscode-extension
env:
DELAY_FACTOR: ${{ matrix.runner == 'windows' && '6' || '4' }}
_JAVA_OPTIONS: ${{ matrix.runner == 'windows' && '-Xmx2G' || '-Xmx4G' }}
run: npx extest setup-and-run out/test/vscode-suite/*.test.js --storage /tmp/uitests

- name: "UI test"
- name: "UI test (ubuntu)"
if: ${{ matrix.runner }} === "buildjet-4vcpu-ubuntu-2204"
working-directory: ./rascal-vscode-extension
env:
DELAY_FACTOR: 2
DELAY_FACTOR: 4
_JAVA_OPTIONS: '-Xmx5G' # we have 16gb of memory, make sure LSP, REPL & DSL-LSP can start
run: xvfb-run --auto-servernum --server-args='-screen 0 1920x1080x24' npx extest setup-and-run out/test/vscode-suite/*.test.js --storage /tmp/uitests

- name: Upload Screenshots
uses: actions/upload-artifact@v3
if: failure()
with:
name: screenshots
name: screenshots-${{ matrix.runner }}
path: /tmp/uitests/**/screenshots/*.png

- name: "cleanup before cache"
Expand Down Expand Up @@ -119,6 +132,7 @@ jobs:
- uses: yogeshlonkar/wait-for-jobs@v0
with:
jobs: "ui-test"
suffix: true
ttl: 15 # if it doesn' succeed in 15min, consider it a failure

- name: upload final vsix
Expand Down

0 comments on commit 2a1d4b6

Please sign in to comment.