Skip to content

Commit

Permalink
Merge pull request #139 from Quantomatic/ci
Browse files Browse the repository at this point in the history
enable continuous integration
  • Loading branch information
RazinShaikh authored Oct 3, 2023
2 parents 2fc7e3c + 4bc89c6 commit ad0ff28
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
name: test
name: lint

on:
push:
branches:
- 'main'
pull_request:

env:
SRC_DIR: zxlive
Expand All @@ -18,9 +21,10 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependecies
run:
python -m pip install ".[test]"
pip install ".[test]"
- name: Flake8
continue-on-error: true
run:
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: test

on:
push:
branches:
- 'main'
pull_request:

env:
SRC_DIR: zxlive
TEST_DIR: test

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ 3.9 ]
env:
DISPLAY: ':99.0'
steps:
- uses: actions/checkout@v3
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Setup QtLibs
uses: # See https://pytest-qt.readthedocs.io/en/latest/troubleshooting.html#github-actions
tlambert03/setup-qt-libs@v1
- name: Setup Ubuntu
run: # See https://pytest-qt.readthedocs.io/en/latest/troubleshooting.html#github-actions
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1920x1200x24 -ac +extension GLX
- name: Install dependencies
run:
pip install ".[test]"
- name: pytest
run:
pytest ${{ env.TEST_DIR }}
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ test = [
"mypy",
"pyproject-flake8",
"pylint",
"pytest-qt",
]
deploy = ["cx_Freeze"]

Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit ad0ff28

Please sign in to comment.