43 Commits

Author SHA1 Message Date
Sunil Mohan Adapa
f19ab68553
ci: Switch backports test to trixie-backports
Tests:

- None. Failing CI pipeline show be fixed.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2025-09-29 16:58:59 +03:00
Sunil Mohan Adapa
aee81477bd
ci: Don't include defunct extract-source job
- According to a recent change in Salsa CI[1], this job does nothing.

- There is a syntax error that causes entire pipeline file from becoming valid.

Link: 2dd7850308
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2025-09-15 15:31:45 +03:00
Sunil Mohan Adapa
72ffaa62a0
.gitlab-ci.yml: Update for new infrastructure
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-10-15 18:56:35 +03:00
James Valleroy
c6f7dec73c
ci: Run autopkgtest but allow failure
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-09-24 13:38:43 -07:00
Joseph Nuthalapati
720c1ec54b
tests: functional: Disable functional tests
The GitLab CI runners for functional tests were deprovisioned.

Disabling the jobs for functional tests until we provision replacement GitLab CI runners.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-04-10 11:22:39 -07:00
Sunil Mohan Adapa
2788d6810d
Makefile: Move various tests into build system
- This allows those tests to be invoked on console and not just in CI pipelines.

Tests:

- Running make check works.

- CI pipeline succeeds.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
[jvalleroy: Remove phony test target]
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-02-12 19:17:16 -05:00
Sunil Mohan Adapa
eba41aa295
pyproject: Add configuration for mypy to ignore some libraries
- This way, we know what we are overriding and can use type annotations for
libraries where they are available.

- Invocation of mypy tool on command line becomes straight forward.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-09-25 20:03:42 -04:00
Sunil Mohan Adapa
a86a86d605
gitlab-ci: Make passing mypy checks mandatory
- There are no more checks that are failing.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-09-25 20:03:31 -04:00
Sunil Mohan Adapa
a709f3a6a8
gitlab-ci: Perform backports tests on bookworm instead of bullseye
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-09-25 20:03:21 -04:00
James Valleroy
949f6ce353
ci: Add mypy static type check
Allow failures for now, until the existing issues are fixed.

Closes: #2129.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2023-07-25 15:22:09 -07:00
Sunil Mohan Adapa
4dda9ad6b9
networks: Use privileged decorator for actions
Tests:

- Initial setup of during first setup works
  - When there are no wired network interfaces
  - When there is 1 wired network interface
    - When there is one wifi interface. wired network is setup as 'external'
      WAN. (simulated with edit of _get_interfaces())
    - When there are no wifi interfaces. wired network is setup as 'internal'
      WAN.
  - When there are multiple wired network interfaces
    - First one is setup as WAN rest as shared
  - When there is one wifi interface, interface is setup as shared.
  - When there are no wifi interfaces

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-10-08 18:52:35 -04:00
Sunil Mohan Adapa
b607174434
config: Use privileged decorator for set domainname action
Tests:

- Running flake8 as in .gitlab-ci.yml works.
- Setting the domain name again to update /etc/hosts file after hostname change
  works
- Setting the domain name from the text box works. New domain name is read back
  and shown properly.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-10-08 18:51:36 -04:00
Sunil Mohan Adapa
40bf6add75
config: Use privileged decorator for set-hostname action
Tests:

- Running flake8 as in .gitlab-ci.yml works.
- Changes the hostname works and it is updated in /etc/hostname
  - Avahi daemon is restarted

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-10-08 18:51:33 -04:00
Sunil Mohan Adapa
6e1c8c30fd
dynamicdns: Check action script with flake8
- When the action was converted from shell to python3, it was not removed from
the exclusion list.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-10-08 18:51:08 -04:00
Veiko Aasa
12d02fecfb
container: Ignore flake8 error 'line too long' in bash script text
Also add container script to flake8 test in gitlab-ci.

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
2022-08-09 19:48:22 +03:00
Joseph Nuthalapati
629ca17ac2
tests: functional: Add jobs for bullseye-backports
- Added an additional build job called 'build-backports'
- Added a separate stage for functional tests in order to avoid
  depending on multiple jobs
- Improved readability of long commands in YAML files
- Depending on GitLab username 'weblate' instead of a RE2 regexp (untested)
- Increased job timeout to 2h 30m

Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2022-06-06 10:21:00 -07:00
Joseph Nuthalapati
f86ed032a3
tests: functional: Integrate into Salsa CI
Functional tests are run in parallel on Debian testing and Debian
unstable using the latest freedombox package built in the pipeline.

Commits by Weblate are ignored.

Fixes freedombox-team/infrastructure#34
Closes freedombox-team/infrastructure!48

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2022-05-26 12:28:17 -07:00
Sunil Mohan Adapa
3c370d02ab
pyproject.toml: Merge contents of .converagerc
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-10-07 15:13:59 -04:00
James Valleroy
d13d59ab42
ci: Disable autopkgtest
Autopkgtest is flaky due to debconf locked error when installing
freedombox package. See #2077 for details.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2021-06-19 09:53:03 +05:30
James Valleroy
95236bcb78 ci: Merge with Salsa CI pipeline
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2021-03-27 09:28:30 -07:00
Joseph Nuthalapati
a1ce12980a
ci: Add --cov-config to the coverage command
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-11-12 10:18:14 -05:00
Sunil Mohan Adapa
07f5b91909
ci: Split testing stages into smaller stages
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-11-01 08:15:35 -05:00
Sunil Mohan Adapa
6180e3a051
doc: wikiparser: Fix issue with running parser outside doc/ dir
Use a path relative to the script path when checking for existence of manual
pages.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-10-30 10:59:08 -07:00
James Valleroy
53921be1b8
ci: Run wikiparser doctests
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-10-30 10:58:52 -07:00
James Valleroy
14fb7f9635
ci: Allow fuse to be installed
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2020-07-19 18:57:07 -04:00
Sunil Mohan Adapa
c69c5f8317
ci: Update link to container in Docker registry
Move Gitlab docker related files to .ci folder

Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2020-05-01 17:15:48 +05:30
Joseph Nuthalapati
001a69e3a2
ci: Use pre-built container image to speed up CI
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-03-13 18:20:26 -04:00
James Valleroy
53bf6e28a6
ci: Switch to testing image
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-03-09 11:35:08 -07:00
Veiko Aasa
962e5b488f
storage: Tests for the directory validation action
Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-26 16:37:01 -05:00
Sunil Mohan Adapa
273c419a26
gitlab-ci: Fix path for HTML coverage report generation
This issue is caused by use of tmpdir fixture which forces the tests to run in a
temporary directory and HTML report to also get generated there.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-10-26 23:01:38 -07:00
Veiko Aasa
ed646d84a5
actions: Check with flake8
Also fix flake8 warnings.

Closes: #1613

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
[sunil@medhas.org split multi strings differently to avoid spaces]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-10-10 19:08:45 -07:00
Nikolas Nyby
5439084c84
Add flake8 to gitlib-ci - closes #58
And fix the rest of the flake8 errors.

Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-07-25 11:07:06 -07:00
Sunil Mohan Adapa
8f2876b1e7
ci: Allow gitlab to parse test coverage results
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-03-11 19:23:49 -04:00
Sunil Mohan Adapa
fd9b6770be
tests: Use pytest for running all tests
- Create option --include-functional to run functional tests. Otherwise, they
  are disabled by default. If pytest-bdd is not installed, functional tests are
  not discovered at all.

- Make pytest-django discover the setting files by creating dummy manage.py in
  top level directory.

- Make pytest run as './setup.py pytest'. Add alias from './setup.py test'. This
  requires pytest-runner package.

- Merge .gitignore files from functional_tests/

- Update gitlab-ci.yml to run tests with coverage using pytest.

- Update HACKING.md to suggest using py.test-3 instead of old way of running.
  Merge functional tests README.md into HACKING.md.

- Remove execution wrapper runtests.py as pytest-django is able to configure
  Django settings before execution of tests. Update tests to explicitly ask for
  Django database as database access is denied by default.

- Replace usage of python3-coverage with python3-pytest-coverage. Execution
  wrappers are not required.

- Add build dependencies on pytest modules.

- Let all warnings be shown after running tests.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-03-10 09:54:23 -04:00
Joseph Nuthalapati
80b4b654de
ci: Export freedombox.deb as build artifact instead of plinth.deb
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2019-01-23 10:40:37 +05:30
Joseph Nuthalapati
a41002ddec
ci: Don't install fuse and fuse3 packages in the CI environment
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2019-01-06 03:56:46 +05:30
James Valleroy
f9604c40a1
ci: Install jquery packages for coverage
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2018-11-24 17:55:31 +05:30
James Valleroy
2cd77f8aa8
Revert "ci: Use python3.6 when installing dependencies"
This reverts commit 8dc4d793df72ba6a2ad055d22b8fcf69eb5b3859.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2018-11-24 17:55:06 +05:30
James Valleroy
71d8f1f923
ci: Prevent installing fuse
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2018-09-26 15:53:15 +05:30
James Valleroy
3d79ad7633
ci: Run test coverage and get report
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2018-08-08 15:46:42 +05:30
Joseph Nuthalapati
7e2c9b1095
ci: Install python3-coverage before running tests
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2018-07-16 13:09:06 +05:30
James Valleroy
8dc4d793df
ci: Use python3.6 when installing dependencies
fail2ban install is failing due to incompatibility with python3.7. As
a temporary workaround, remove all python3.7 packages before
installing dependencies.

However, python3-all is a build-dependency, so re-install it before
building the package.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2018-07-16 10:21:53 +05:30
Joseph Nuthalapati
8a7eb0f274
ci: Replace CircleCI configuration with GitLab CI configuration
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2018-01-29 15:36:03 +05:30