Improve autostart #1381
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run tests | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-14, macos-13, windows-latest] | |
fail-fast: false | |
steps: | |
- name: run on mac | |
if: matrix.os == 'macos-14' | |
run: | | |
sudo xcode-select -s "/Applications/Xcode_15.4.app" | |
echo "==> Build environment" | |
xcode-select -p | |
xcrun --show-sdk-version | |
- name: Setup DBUS environment | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
export DISPLAY=:0 | |
sudo apt install dbus-x11 | |
machineId=$(cat /var/lib/dbus/machine-id) | |
mkdir -p /home/runner/.dbus | |
mkdir -p /home/runner/.dbus/session-bus/ | |
touch /home/runner/.dbus/session-bus/${machineId}-0 | |
sudo dbus-launch --exit-with-session | |
sleep 5 # Wait for the DBUS session to start | |
echo $DBUS_SESSION_BUS_ADDRESS | |
eval `dbus-launch --sh-syntax` | |
address=$(echo $DBUS_SESSION_BUS_ADDRESS) | |
echo "DBUS_SESSION_BUS_ADDRESS=${address}" > /home/runner/.dbus/session-bus/${machineId}-0 | |
- name: Check for file | |
if: matrix.os == 'ubuntu-latest' | |
run: cat /home/runner/.dbus/session-bus/$(cat /var/lib/dbus/machine-id)-0 | |
- name: Set Timezone | |
uses: szenius/[email protected] | |
with: | |
timezoneLinux: Europe/Amsterdam | |
timezoneMacos: Europe/Amsterdam | |
timezoneWindows: W. Europe Standard Time | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.12' | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20.11.1' | |
- run: pip install setuptools | |
- run: npm install npm -g | |
- run: npm install | |
- name: Install missing usocket | |
if: matrix.os == 'ubuntu-latest' | |
run: npm install usocket | |
- run: npm run coverage | |
env: | |
CI: true | |
DISPLAY: ':0' | |
- name: Codecov | |
uses: codecov/codecov-action@v3 |