mirror of
https://github.com/sezanzeb/input-remapper
synced 2024-11-12 01:10:38 +00:00
ee6b48ac32
* Run linters and unit tests with github actions * Reformat with black, 22.1.0 (compiled: yes) * Remove native deps as should no longer be needed * Remove pylint from workflows * Remove unused Gtk dependency in test_daemon.py * Install subset of python deps with apt-get for ci
29 lines
925 B
YAML
29 lines
925 B
YAML
name: Test
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
build:
|
|
continue-on-error: true
|
|
runs-on: ubuntu-latest
|
|
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
|
|
strategy:
|
|
matrix:
|
|
python-version: ["3.7", "3.10"] # min and max supported versions?
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
- name: Install dependencies
|
|
run: |
|
|
# Install deps as root since we will run tests as root
|
|
sudo scripts/ci-install-deps.sh
|
|
sudo pip install .
|
|
- name: Run tests
|
|
run: |
|
|
# FIXME: Had some permissions issues, currently worked around by running tests as root
|
|
mkdir test_tmp
|
|
TMPDIR="$(realpath test_tmp)" sudo python tests/test.py --start-dir unit
|