diff --git a/README.md b/README.md index e6b8c85..068f2ed 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # XVFB Github Action -This action installs [XVFB](http://elementalselenium.com/tips/38-headless) and runs your headless tests with it. It cleans up the xvfb process after your tests are done. If it detects you're not using linux then your tests still run, but without xvfb, which is very practical for multi-platform workflows. +This action installs [XVFB](http://elementalselenium.com/tips/38-headless) and runs your headless tests with it. It cleans up the `xvfb` process after your tests are done. If it detects you're **not** using Ubuntu, your tests still run without `xvfb`, which is very practical for multi-platform workflows. ### Example usage @@ -15,7 +15,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Run headless test uses: coactions/setup-xvfb@v1 with: @@ -23,3 +23,12 @@ jobs: working-directory: ./ #optional options: #optional ``` + +Modern [GitHub Actions Ubuntu images](https://github.com/actions/runner-images/tree/main/images/ubuntu) now include `xvfb` so this Action could be replaced by: + +```yml +- if: runner.os == 'Linux' + run: xvfb-run npm test +- if: runner.os != 'Linux' + run: npm test +```