Skip to content

Commit

Permalink
fix: GH ACTIONS compare Electron Puppeteer task
Browse files Browse the repository at this point in the history
  • Loading branch information
danielweck committed Sep 18, 2024
1 parent 88cf544 commit 06baa30
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ jobs:
- run: npm --global install yarn@^1
- run: yarn --version
- run: git --no-pager diff
- run: yarn install --frozen-lockfile
# - run: yarn install --frozen-lockfile
- name: YARN install
run: 'yarn install'
shell: bash
# - name: PR action
# if: ${{ github.event_name == 'pull_request' }}
# run: echo PR
Expand All @@ -87,3 +90,9 @@ jobs:
- name: non-PR action, Mac, Electron
if: ${{ github.event_name != 'pull_request' && (matrix.osarch == 'macos-intel' || matrix.osarch == 'macos-arm') }}
run: echo "${{ matrix.osarch }}" && yarn test-electron && yarn test-electron-cli
- name: non-PR action, Linux, Puppeteer vs. Electron test
if: ${{ github.event_name != 'pull_request' && (matrix.osarch == 'linux-intel' || matrix.osarch == 'linux-arm') }}
run: echo "${{ matrix.osarch }}" && rm -rf ./CompareAxeRunners && ACE_PERF=1 xvfb-run --auto-servernum node ./packages/ace/bin/ace-electron.js -f -s -o ./CompareAxeRunners/ElectronAxeRunner ./tests/data/issue-290.epub && ACE_PERF=1 xvfb-run --auto-servernum node ./packages/ace-cli/bin/ace.js -f -s -o ./CompareAxeRunners/PuppeteerAxeRunner ./tests/data/issue-290.epub && node ./scripts/normalise_report_json.js ./CompareAxeRunners/PuppeteerAxeRunner/report.json && node ./scripts/normalise_report_json.js ./CompareAxeRunners/ElectronAxeRunner/report.json && node node_modules/json-diff/bin/json-diff.js ./CompareAxeRunners/PuppeteerAxeRunner/report_normalised.json ./CompareAxeRunners/ElectronAxeRunner/report_normalised.json
- name: non-PR action, Mac, Puppeteer vs. Electron test
if: ${{ github.event_name != 'pull_request' && (matrix.osarch == 'macos-intel' || matrix.osarch == 'macos-arm') }}
run: echo "${{ matrix.osarch }}" && rm -rf ./CompareAxeRunners && ACE_PERF=1 node ./packages/ace/bin/ace-electron.js -f -s -o ./CompareAxeRunners/ElectronAxeRunner ./tests/data/issue-290.epub && ACE_PERF=1 node ./packages/ace-cli/bin/ace.js -f -s -o ./CompareAxeRunners/PuppeteerAxeRunner ./tests/data/issue-290.epub && node ./scripts/normalise_report_json.js ./CompareAxeRunners/PuppeteerAxeRunner/report.json && node ./scripts/normalise_report_json.js ./CompareAxeRunners/ElectronAxeRunner/report.json && node node_modules/json-diff/bin/json-diff.js ./CompareAxeRunners/PuppeteerAxeRunner/report_normalised.json ./CompareAxeRunners/ElectronAxeRunner/report_normalised.json
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ USER notroot
#ENV DISPLAY :99.0

RUN cd /ACE/ &&\
# export DBUS_SYSTEM_BUS_ADDRESS='unix:path=/var/run/dbus/system_bus_socket'
# export DBUS_SESSION_BUS_ADDRESS='unix:path=/var/run/dbus/system_bus_socket'
# export DISPLAY=:99.0 &&\
# echo $DISPLAY &&\
# (Xvfb :99 -ac -screen 0 1024x768x16 &> /ACE/xvfb.log &) &&\
Expand Down

0 comments on commit 06baa30

Please sign in to comment.