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: Trying with Xvfb | |
on: | |
push: | |
branches: | |
- main | |
- dev | |
- ci-dev | |
pull_request: | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
name: Ruby ${{ matrix.ruby }} | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
- macos-latest | |
ruby: | |
- '3.2.2' | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Ruby & Rust | |
uses: oxidize-rb/actions/setup-ruby-and-rust@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: true | |
cargo-cache: true | |
rubygems: '3.4.14' | |
- name: Install dependencies | |
run: | | |
if [ "${{ matrix.os }}" = "ubuntu-latest" ]; then | |
sudo apt update | |
sudo apt install -y libwebkit2gtk-4.1-dev | |
sudo apt install -y libayatana-appindicator3-dev | |
sudo apt install -y at-spi2-core | |
else | |
brew update | |
fi | |
- name: Run the default task | |
uses: coactions/setup-xvfb@v1 | |
with: | |
run: bundle exec rake | |
- name: Capture screenshot | |
run: | | |
if [ "${{ matrix.os }}" = "ubuntu-latest" ]; then | |
DISPLAY=:99 import -window root screenshot.png | |
else | |
screencapture screenshot.png | |
fi | |
echo "Screenshot captured!" | |
ls -l |