Updated worflow
This commit is contained in:
10
.github/workflows/installer.yml
vendored
10
.github/workflows/installer.yml
vendored
@@ -11,7 +11,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
python-version: [3.7, 3.8, 3.9]
|
python-version: [3.8, 3.9, 3.10, 3.11]
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@@ -24,15 +24,15 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
pip install -r test-requirements.txt
|
pip install -r test-requirements.txt
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
if: ${{ matrix.python-version != '3.9' }}
|
if: ${{ matrix.python-version != '3.11' }}
|
||||||
run: |
|
run: |
|
||||||
python tests.py
|
python tests.py
|
||||||
- name: Run tests and coverage
|
- name: Run tests and coverage
|
||||||
if: ${{ matrix.python-version == '3.9' }}
|
if: ${{ matrix.python-version == '3.11' }}
|
||||||
run: |
|
run: |
|
||||||
coverage run tests.py
|
coverage run tests.py
|
||||||
- name: Upload coverage result
|
- name: Upload coverage result
|
||||||
if: ${{ matrix.python-version == '3.9' }}
|
if: ${{ matrix.python-version == '3.11' }}
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: coverage-results
|
name: coverage-results
|
||||||
@@ -46,7 +46,7 @@ jobs:
|
|||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: '3.9'
|
python-version: '3.11'
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
pip install codecov
|
pip install codecov
|
||||||
|
|||||||
18
checks.py
18
checks.py
@@ -14,14 +14,18 @@ def check_version():
|
|||||||
with urlopen("https://raw.githubusercontent.com/modoboa/modoboa-installer/master/version.txt") as r_version:
|
with urlopen("https://raw.githubusercontent.com/modoboa/modoboa-installer/master/version.txt") as r_version:
|
||||||
remote_version = r_version.read().decode()
|
remote_version = r_version.read().decode()
|
||||||
if local_version == "" or remote_version == "":
|
if local_version == "" or remote_version == "":
|
||||||
utils.printcolor("Could not check that your installer is up to date: "
|
utils.printcolor(
|
||||||
f"local version: {local_version}, "
|
"Could not check that your installer is up-to-date: "
|
||||||
f"remote version: {remote_version}",
|
f"local version: {local_version}, "
|
||||||
utils.YELLOW)
|
f"remote version: {remote_version}",
|
||||||
|
utils.YELLOW
|
||||||
|
)
|
||||||
if remote_version != local_version:
|
if remote_version != local_version:
|
||||||
utils.error("Your installer seems outdated.\n"
|
utils.error(
|
||||||
"Check the README for instruction on how to update.\n"
|
"Your installer seems outdated.\n"
|
||||||
"No support will be provided without an up to date installer!")
|
"Check README file for instructions about how to update.\n"
|
||||||
|
"No support will be provided without an up-to-date installer!"
|
||||||
|
)
|
||||||
answer = utils.user_input("Continue anyway? (Y/n) ")
|
answer = utils.user_input("Continue anyway? (Y/n) ")
|
||||||
if not answer.lower().startswith("y"):
|
if not answer.lower().startswith("y"):
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|||||||
Reference in New Issue
Block a user