diff options
author | Nate Sesti <sestinj@gmail.com> | 2023-08-09 18:49:13 -0700 |
---|---|---|
committer | Nate Sesti <sestinj@gmail.com> | 2023-08-09 18:49:13 -0700 |
commit | a1fada4e7f0be2d5aa661aee483a59ba93bacb40 (patch) | |
tree | 482531918472a8ede34d91cfe09dab4458ca52b5 /.github | |
parent | b4d59917cc3f0a30a56ef51ce11e6202cd01e0a1 (diff) | |
download | sncontinue-a1fada4e7f0be2d5aa661aee483a59ba93bacb40.tar.gz sncontinue-a1fada4e7f0be2d5aa661aee483a59ba93bacb40.tar.bz2 sncontinue-a1fada4e7f0be2d5aa661aee483a59ba93bacb40.zip |
ci: :green_heart: install Xvfb to run headless electron on Linux
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/main.yaml | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 4f1e538c..8249b576 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -14,6 +14,8 @@ jobs: runs-on: ${{ matrix.os }} steps: + # Install Python requirements and build+upload binaries for each platform + - name: Check-out repository uses: actions/checkout@v3 @@ -55,6 +57,8 @@ jobs: - name: Checkout uses: actions/checkout@v2 + # Download corresponding binary artifact for the platform + - name: Create exe directory run: | mkdir extension/server/exe @@ -80,6 +84,8 @@ jobs: path: extension/server/exe/windows if: matrix.os == 'windows-latest' + # Setup Node.js and install dependencies + - name: Use Node.js 19.0.0 uses: actions/setup-node@v3 with: @@ -107,16 +113,26 @@ jobs: cd extension/react-app npm ci --legacy-peer-deps + # Run tests + - name: Package the extension run: | cd extension npm run package + - name: Install Xvfb for Linux + run: | + sudo apt-get install -y xvfb # Install Xvfb + Xvfb :99 & # Start Xvfb + export DISPLAY=:99 # Export the display number to the environment + if: matrix.os == 'ubuntu-20.04' + - name: Run extension tests run: | cd extension npm run test + # Package again and build+upload the .vsix - name: Remove exe directory and re-package run: | cd extension @@ -137,6 +153,8 @@ jobs: contents: write steps: + # Checkout and download .vsix artifact + - name: Checkout uses: actions/checkout@v2 @@ -146,6 +164,8 @@ jobs: name: vsix-artifact path: extension/build + # Publish the extension and commit/push the version change + - name: Publish run: | cd extension |