Tests #218
This file contains hidden or 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: 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 |