Skip to content

Commit

Permalink
chore: Update GitHub Actions workflow to use xvfb and fix dependencies
Browse files Browse the repository at this point in the history
 * Update `node-version` to 20.x in `.github/workflows/jan-electron-linter-and-test.yml`
 * Remove redundant `Setup Xvfb` step
 * Fix Makefile to comment out sed commands for Windows and Linux
  • Loading branch information
louis-menlo committed Dec 29, 2024
1 parent 74c179f commit 13d23fb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/jan-electron-linter-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,11 @@ jobs:
- name: Installing node
uses: actions/setup-node@v3
with:
node-version: 20
node-version: 20.x

- name: Setup Xvfb
run: |
sudo apt-get install -y xvfb libasound2 libnss3-dev libgdk-pixbuf2.0-dev libgtk-3-dev libxss-dev
- name: 'Cleanup cache'
continue-on-error: true
Expand All @@ -287,10 +291,6 @@ jobs:
run: |
make update-playwright-config REPORT_PORTAL_URL=${{ secrets.REPORT_PORTAL_URL }} REPORT_PORTAL_API_KEY=${{ secrets.REPORT_PORTAL_API_KEY }} REPORT_PORTAL_PROJECT_NAME=${{ secrets.REPORT_PORTAL_PROJECT_NAME }} REPORT_PORTAL_LAUNCH_NAME="Jan App Linux" REPORT_PORTAL_DESCRIPTION="${{env.REPORT_PORTAL_DESCRIPTION}}"
- name: Setup Xvfb
run: |
sudo apt-get install xvfb
- name: Linter and test
run: |
export DISPLAY=$(w -h | awk 'NR==1 {print $2}')
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ ifeq ($(OS),Windows_NT)
],\n\
description: '$(REPORT_PORTAL_DESCRIPTION)',\n\
}\n$$(cat electron/playwright.config.ts)" > electron/playwright.config.ts;
sed -i "s/^ reporter: .*/ reporter: [['@reportportal\/agent-js-playwright', RPconfig]],/" electron/playwright.config.ts
# sed -i "s/^ reporter: .*/ reporter: [['@reportportal\/agent-js-playwright', RPconfig]],/" electron/playwright.config.ts

else ifeq ($(shell uname -s),Linux)
echo "const RPconfig = {\n\
Expand Down Expand Up @@ -101,7 +101,7 @@ else
],\n\
description: '$(REPORT_PORTAL_DESCRIPTION)',\n\
}\n$$(cat electron/playwright.config.ts)" > electron/playwright.config.ts;
sed -i '' "s|^ reporter: .*| reporter: [['@reportportal\/agent-js-playwright', RPconfig]],|" electron/playwright.config.ts
# sed -i '' "s|^ reporter: .*| reporter: [['@reportportal\/agent-js-playwright', RPconfig]],|" electron/playwright.config.ts
endif

# Testing
Expand Down

0 comments on commit 13d23fb

Please sign in to comment.