Skip to content

Commit

Permalink
ci: modernise python deps installation.
Browse files Browse the repository at this point in the history
  • Loading branch information
roddhjav committed Jan 24, 2024
1 parent 9855fe8 commit 591e943
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 22 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/main.yml
Expand Up @@ -32,24 +32,21 @@ jobs:

- name: Install required packages
run: |
sudo apt-get install gnome-keyring libsodium23 pass
sudo apt-get install -y gnome-keyring libsodium23 pass
- name: Install python dependencies
run: |
# sudo ln -s /usr/lib/x86_64-linux-gnu/libsodium.so.23 /usr/lib/x86_64-linux-gnu/libequihash.so
# sudo ln -s /usr/lib/x86_64-linux-gnu/libsodium.so.23 /usr/lib/x86_64-linux-gnu/libsphinx.so
# sudo ldconfig
pip3 install -U setuptools
pip3 install green coverage codacy-coverage pyaml defusedxml cryptography pykeepass secretstorage zxcvbn ${{ matrix.magic }}
pip3 install --upgrade setuptools
pip3 install --upgrade green coverage \
codacy-coverage pyaml defusedxml cryptography pykeepass secretstorage
zxcvbn jsonpath-ng ${{ matrix.magic }}
- name: Configure password managers
run: |
echo '#!/usr/bin/env bash\necho lpass' | sudo tee /usr/bin/lpass
sudo chmod 755 /usr/bin/lpass
mkdir -p ~/.local/share/keyrings/
cp tests/assets/db/gnome-keyring.keyring ~/.local/share/keyrings/pass-import.keyring
cp tests/assets/db/sphinx.cfg ~/.sphinxrc
# sphinx init
- name: Run the tests
run: dbus-run-session -- make tests
24 changes: 11 additions & 13 deletions .gitlab-ci.yml
Expand Up @@ -26,20 +26,22 @@ variables:
- cp tests/assets/db/gnome-keyring.keyring ~/.local/share/keyrings/pass-import.keyring

.sphinx: &sphinx
- pip3 install --upgrade pip
- pip3 install --upgrade pwdsphinx
- pip3 install --break-system-packages --upgrade pwdsphinx
- ln -s /usr/lib/x86_64-linux-gnu/libsodium.so.23 /usr/lib/x86_64-linux-gnu/libequihash.so
- ln -s /usr/lib/x86_64-linux-gnu/libsodium.so.23 /usr/lib/x86_64-linux-gnu/libsphinx.so
- ldconfig
- cp tests/assets/db/sphinx.cfg ~/.sphinxrc
- sphinx init

.pip: &pip
- pip3 install --break-system-packages --upgrade pip
- pip3 install --break-system-packages --upgrade
coverage cryptography defusedxml dominate green pyaml jsonpath-ng
pykeepass pypandoc python-magic requests secretstorage zxcvbn

.script:
script:
- pip3 install --upgrade pip
- pip3 install --upgrade
coverage cryptography defusedxml dominate green pyaml
pykeepass pypandoc python-magic requests secretstorage zxcvbn
- *pip
- *lpass
- *gnome-keyring
- make
Expand All @@ -60,9 +62,6 @@ variables:
.distribution:
extends: .script
stage: dist
only:
- tags
- web


# Jobs definitions
Expand Down Expand Up @@ -121,7 +120,7 @@ archlinux:
dbus gnome-keyring file pandoc python-setuptools

ubuntu:
image: ubuntu
image: ubuntu:24.04
extends: .distribution
before_script:
- apt-get update -q && apt-get install -y make pass python3-pip grep wget
Expand All @@ -138,9 +137,8 @@ fedora:
image: fedora
extends: .distribution
before_script:
- dnf -y install make gpg pass python-setuptools python3-pip grep which dbus dbus-daemon
gnome-keyring pandoc --setopt=install_weak_deps=False

- dnf -y install make gpg pass python-setuptools python3-pip grep which dbus
dbus-daemon gnome-keyring pandoc --setopt=install_weak_deps=False

# Code coverage deployment

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -15,7 +15,7 @@ local:
@echo "Remember to set PASSWORD_STORE_ENABLE_EXTENSIONS to 'true' for the extension to be enabled."

tests:
@python3 -m green -vvv --run-coverage --termcolor --processes $(shell nproc)
@green -vvv --run-coverage --termcolor --processes $(shell nproc)
@coverage html

lint:
Expand Down

0 comments on commit 591e943

Please sign in to comment.