Merge pull request #1 from uliegecsm/first #31
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
container: | |
image: python:3.10 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies. | |
run : | | |
python -m pip install typeguard -r requirements/requirements.python.test.txt | |
- name: Run tests. | |
run : | | |
python -m pytest tests -s --log-cli-level=info | |
install-as-package-and-test: | |
runs-on: [ubuntu-latest] | |
container: | |
image: python:${{ matrix.version }} | |
strategy: | |
matrix: | |
version: ['3.10', '3.12'] | |
steps: | |
- name: Install as package. | |
run : | | |
pip install git+https://github.com/uliegecsm/system-helpers.git@${{ github.sha }} | |
- name: Test 'apt' helpers CLI directly. | |
run : | | |
apt-helpers install-packages --update --clean --upgrade --packages jq | |
jq --version | |
- name: Test 'update-alternatives' helpers CLI directly. | |
run : | | |
update-alternatives-helpers --help | |
- name: Check that we can import packages in Python. | |
run : | | |
python -c "from system_helpers.apt import install as u;print(u)" | |
python -c "from system_helpers.update_alternatives import alternatives as u;print(u)" |