forked from Github-Mirrors/canaille
chore: GHA refactoring
This commit is contained in:
parent
ef53e7f4ba
commit
01e7ad9b01
1 changed files with 20 additions and 24 deletions
44
.github/workflows/tests.yaml
vendored
44
.github/workflows/tests.yaml
vendored
|
@ -23,60 +23,56 @@ jobs:
|
||||||
- '3.8'
|
- '3.8'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-python@v2
|
- uses: actions/setup-python@v3
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python }}
|
python-version: ${{ matrix.python }}
|
||||||
|
cache: 'poetry'
|
||||||
- name: Update apt repositories
|
- name: Update apt repositories
|
||||||
run: sudo apt update
|
run: sudo apt update
|
||||||
- name: Install apt dependencies
|
- name: Install apt dependencies
|
||||||
run: sudo apt --yes install apparmor-utils libsasl2-dev python3-dev libldap2-dev libssl-dev slapd ldap-utils
|
run: sudo apt --yes install apparmor-utils libsasl2-dev python3-dev libldap2-dev libssl-dev slapd ldap-utils
|
||||||
- name: App armor configuration for slapd
|
- name: App armor configuration for slapd
|
||||||
run: sudo aa-complain /usr/sbin/slapd
|
run: sudo aa-complain /usr/sbin/slapd
|
||||||
- uses: actions/cache@v1
|
- run: poetry install
|
||||||
with:
|
- run: poetry run pytest
|
||||||
path: ~/.cache/pip
|
minversions:
|
||||||
key: pip|${{ hashFiles('setup.py') }}|${{ hashFiles('tox.ini') }}
|
name: minimum dependency versions
|
||||||
- run: pip install --upgrade tox "poetry>1.3.0" coveralls pyyaml tomli
|
|
||||||
- run: tox -e py
|
|
||||||
style:
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-python@v2
|
- uses: actions/setup-python@v3
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
|
cache: 'poetry'
|
||||||
- name: Update apt repositories
|
- name: Update apt repositories
|
||||||
run: sudo apt update
|
run: sudo apt update
|
||||||
- name: Install apt dependencies
|
- name: Install apt dependencies
|
||||||
run: sudo apt --yes install apparmor-utils libsasl2-dev python3-dev libldap2-dev libssl-dev slapd ldap-utils
|
run: sudo apt --yes install apparmor-utils libsasl2-dev python3-dev libldap2-dev libssl-dev slapd ldap-utils
|
||||||
- name: App armor configuration for slapd
|
- name: App armor configuration for slapd
|
||||||
run: sudo aa-complain /usr/sbin/slapd
|
run: sudo aa-complain /usr/sbin/slapd
|
||||||
- uses: actions/cache@v1
|
- name: Force minimum dependency versions
|
||||||
with:
|
run: sed -i -E 's/"(\^|>=)([0-9])/"==\2/' pyproject.toml
|
||||||
path: ~/.cache/pip
|
- run: poetry install
|
||||||
key: pip|${{ hashFiles('setup.py') }}|${{ hashFiles('tox.ini') }}
|
- run: poetry run pytest
|
||||||
- uses: actions/cache@v1
|
style:
|
||||||
with:
|
runs-on: ubuntu-latest
|
||||||
path: ~/.cache/pre-commit
|
steps:
|
||||||
key: pre-commit|${{ hashFiles('.pre-commit-config.yaml') }}
|
- uses: actions/checkout@v3
|
||||||
- run: pip install --upgrade tox "poetry>1.3.0" coveralls pyyaml tomli
|
- uses: actions/setup-python@v3
|
||||||
- run: tox -e style
|
- uses: pre-commit/action@v3.0.0
|
||||||
doc:
|
doc:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-python@v2
|
- uses: actions/setup-python@v3
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
|
cache: 'poetry'
|
||||||
- name: Update apt repositories
|
- name: Update apt repositories
|
||||||
run: sudo apt update
|
run: sudo apt update
|
||||||
- name: Install apt dependencies
|
- name: Install apt dependencies
|
||||||
run: sudo apt --yes install apparmor-utils libsasl2-dev python3-dev libldap2-dev libssl-dev slapd ldap-utils
|
run: sudo apt --yes install apparmor-utils libsasl2-dev python3-dev libldap2-dev libssl-dev slapd ldap-utils
|
||||||
- name: App armor configuration for slapd
|
- name: App armor configuration for slapd
|
||||||
run: sudo aa-complain /usr/sbin/slapd
|
run: sudo aa-complain /usr/sbin/slapd
|
||||||
- uses: actions/cache@v1
|
|
||||||
with:
|
|
||||||
path: ~/.cache/pip
|
|
||||||
key: pip|${{ hashFiles('setup.py') }}|${{ hashFiles('tox.ini') }}
|
|
||||||
- run: pip install --upgrade tox "poetry>1.3.0" coveralls pyyaml tomli
|
- run: pip install --upgrade tox "poetry>1.3.0" coveralls pyyaml tomli
|
||||||
- run: tox -e doc
|
- run: tox -e doc
|
||||||
|
|
Loading…
Reference in a new issue