Skip to content

Tests

Tests #167

Workflow file for this run

name: Tests
on:
push:
pull_request:
schedule:
- cron: 0 0 * * 0
jobs:
tests:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-20.04
container:
image: ghcr.io/delgan/qml-format:main
options: --privileged # Required to use 'xvfb-run' (https://linuxmeerkat.wordpress.com/2014/10/17/running-a-gui-application-in-a-docker-container/)
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set ownership
run: |
# Workaround for https://github.com/actions/runner/issues/2033
chown -R $(id -u):$(id -g) $PWD
- name: Install dependencies
run: npm install
- name: Run tests
run: xvfb-run -a npm test