ci: call the linters on the installed directory
This commit is contained in:
parent
70ba837431
commit
124d086009
3
.flake8
3
.flake8
|
@ -2,6 +2,3 @@
|
||||||
builtins = _
|
builtins = _
|
||||||
max-line-length = 100
|
max-line-length = 100
|
||||||
show-source = true
|
show-source = true
|
||||||
|
|
||||||
# Temporary
|
|
||||||
exclude = src/diffuse/main.py
|
|
||||||
|
|
|
@ -18,34 +18,38 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions/setup-python@v2
|
- uses: actions/setup-python@v2
|
||||||
- run: sudo apt install libgirepository1.0-dev
|
|
||||||
- run: pip install -r requirements.txt
|
|
||||||
|
|
||||||
- name: Flake8
|
|
||||||
run: flake8 src/ po/
|
|
||||||
|
|
||||||
- name: MyPy
|
|
||||||
run: mypy src/ po/
|
|
||||||
|
|
||||||
meson-build-test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- uses: actions/setup-python@v2
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: sudo apt-get -y install appstream appstream-util desktop-file-utils gettext
|
run: |
|
||||||
|
sudo apt-get -y install libgirepository1.0-dev appstream appstream-util desktop-file-utils gettext
|
||||||
|
pip install -r requirements.txt
|
||||||
|
|
||||||
- name: Meson build
|
- name: Meson build
|
||||||
uses: BSFishy/meson-build@v1.0.3
|
uses: BSFishy/meson-build@v1.0.3
|
||||||
with:
|
with:
|
||||||
action: build
|
action: build
|
||||||
|
setup-options: --prefix=/tmp/diffuse
|
||||||
|
|
||||||
- name: Meson test
|
- name: Meson test
|
||||||
uses: BSFishy/meson-build@v1.0.3
|
uses: BSFishy/meson-build@v1.0.3
|
||||||
with:
|
with:
|
||||||
action: test
|
action: test
|
||||||
|
|
||||||
|
- name: Meson install
|
||||||
|
uses: BSFishy/meson-build@v1.0.3
|
||||||
|
with:
|
||||||
|
action: install
|
||||||
|
|
||||||
|
- name: Flake8
|
||||||
|
run: |
|
||||||
|
flake8 /tmp/diffuse/
|
||||||
|
flake8 po/
|
||||||
|
|
||||||
|
- name: MyPy
|
||||||
|
run: |
|
||||||
|
mypy /tmp/diffuse/
|
||||||
|
mypy po/
|
||||||
|
|
||||||
flatpak-build-test:
|
flatpak-build-test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
|
@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
io.github.mightycreak.Diffuse.appdata.xml.in
|
io.github.mightycreak.Diffuse.appdata.xml.in
|
||||||
- Leaner README.md
|
- Leaner README.md
|
||||||
- Moved the documentation to docs/
|
- Moved the documentation to docs/
|
||||||
|
- In the CI, call the linters on the installed directory
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Removed the lasting lint errors (i.e. in main.py)
|
- Removed the lasting lint errors (i.e. in main.py)
|
||||||
|
|
|
@ -2,4 +2,4 @@
|
||||||
#
|
#
|
||||||
# Copyright (C) 2006-2009 Derrick Moser <derrick_moser@yahoo.com>
|
# Copyright (C) 2006-2009 Derrick Moser <derrick_moser@yahoo.com>
|
||||||
|
|
||||||
import @pkgdatadir@/syntax/*.syntax
|
import @PKGDATADIR@/syntax/*.syntax
|
||||||
|
|
|
@ -33,7 +33,7 @@ endif
|
||||||
|
|
||||||
# Diffuse config file
|
# Diffuse config file
|
||||||
conf = configuration_data()
|
conf = configuration_data()
|
||||||
conf.set('pkgdatadir', pkgdatadir)
|
conf.set('PKGDATADIR', pkgdatadir)
|
||||||
|
|
||||||
configure_file(
|
configure_file(
|
||||||
input: 'diffuserc.in',
|
input: 'diffuserc.in',
|
||||||
|
|
|
@ -23,9 +23,8 @@ COPYRIGHT = '''{copyright} © 2006-2019 Derrick Moser
|
||||||
{copyright} © 2015-2021 Romain Failliot'''.format(copyright=_("Copyright")) # type: ignore
|
{copyright} © 2015-2021 Romain Failliot'''.format(copyright=_("Copyright")) # type: ignore
|
||||||
WEBSITE = 'https://mightycreak.github.io/diffuse/'
|
WEBSITE = 'https://mightycreak.github.io/diffuse/'
|
||||||
|
|
||||||
LOCALEDIR = '@LOCALEDIR@'
|
|
||||||
SYSCONFIGDIR = '@SYSCONFIGDIR@'
|
SYSCONFIGDIR = '@SYSCONFIGDIR@'
|
||||||
|
|
||||||
USE_FLATPAK = @USE_FLATPAK@
|
|
||||||
LOG_PRINT_OUTPUT = @LOG_PRINT_OUTPUT@
|
LOG_PRINT_OUTPUT = @LOG_PRINT_OUTPUT@
|
||||||
LOG_PRINT_STACK = @LOG_PRINT_STACK@
|
LOG_PRINT_STACK = @LOG_PRINT_STACK@
|
||||||
|
USE_FLATPAK = @USE_FLATPAK@
|
||||||
|
|
|
@ -21,7 +21,6 @@ import os
|
||||||
import sys
|
import sys
|
||||||
import codecs
|
import codecs
|
||||||
import encodings
|
import encodings
|
||||||
import gettext
|
|
||||||
import shlex
|
import shlex
|
||||||
import stat
|
import stat
|
||||||
import webbrowser
|
import webbrowser
|
||||||
|
@ -1754,8 +1753,6 @@ GObject.signal_new('save-as', Diffuse.FileDiffViewer.PaneHeader, GObject.SignalF
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
gettext.install('diffuse', LOCALEDIR)
|
|
||||||
|
|
||||||
# app = Application()
|
# app = Application()
|
||||||
# return app.run(sys.argv)
|
# return app.run(sys.argv)
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,8 @@ python = import('python')
|
||||||
|
|
||||||
conf = configuration_data()
|
conf = configuration_data()
|
||||||
conf.set('PYTHON', python.find_installation('python3').path())
|
conf.set('PYTHON', python.find_installation('python3').path())
|
||||||
conf.set('pkgdatadir', pkgdatadir)
|
conf.set('PKGDATADIR', pkgdatadir)
|
||||||
|
conf.set('LOCALEDIR', join_paths(get_option('prefix'), get_option('localedir')))
|
||||||
|
|
||||||
configure_file(
|
configure_file(
|
||||||
input: 'diffuse.in',
|
input: 'diffuse.in',
|
||||||
|
@ -17,7 +18,6 @@ configure_file(
|
||||||
|
|
||||||
conf = configuration_data()
|
conf = configuration_data()
|
||||||
conf.set('VERSION', meson.project_version())
|
conf.set('VERSION', meson.project_version())
|
||||||
conf.set('LOCALEDIR', join_paths(get_option('prefix'), get_option('localedir')))
|
|
||||||
conf.set('SYSCONFIGDIR', join_paths(get_option('prefix'), get_option('sysconfdir')))
|
conf.set('SYSCONFIGDIR', join_paths(get_option('prefix'), get_option('sysconfdir')))
|
||||||
conf.set('LOG_PRINT_OUTPUT', get_option('log_print_output'))
|
conf.set('LOG_PRINT_OUTPUT', get_option('log_print_output'))
|
||||||
conf.set('LOG_PRINT_STACK', get_option('log_print_stack'))
|
conf.set('LOG_PRINT_STACK', get_option('log_print_stack'))
|
||||||
|
|
Loading…
Reference in New Issue