hosts: Add distro information to BaseLinuxHost #1030
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: CI | |
on: | |
push: | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
tox: | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.11", "3.x"] | |
upstream: ["upstream", "pypi"] | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
steps: | |
- name: Detect skipped environments | |
id: skipenv | |
env: | |
UPSTREAM: ${{ matrix.upstream }} | |
run: | | |
set -ex | |
case $UPSTREAM in | |
upstream) | |
echo 'skipenv=.*(?<!upstream)$' >> $GITHUB_OUTPUT | |
;; | |
*) | |
echo 'skipenv=.*-upstream$' >> $GITHUB_OUTPUT | |
;; | |
esac | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
# Install dependencies for python-ldap | |
sudo apt-get install -y libsasl2-dev python3-dev libldap2-dev libssl-dev | |
python -m pip install --upgrade pip | |
pip install tox tox-gh | |
- name: Prepare tox environment and install packages | |
run: | | |
tox --skip-env '${{ steps.skipenv.outputs.skipenv }}' --colored=yes --notest | |
- name: Run tests | |
run: | | |
tox --skip-env '${{ steps.skipenv.outputs.skipenv }}' --colored=yes --skip-pkg-install |