Skip to content

Commit

Permalink
Updated worflow
Browse files Browse the repository at this point in the history
  • Loading branch information
tonioo committed Apr 24, 2024
1 parent c9a2f26 commit fb961f9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
python-version: [3.8, 3.9, 3.10, 3.11]
fail-fast: false

steps:
Expand All @@ -24,15 +24,15 @@ jobs:
run: |
pip install -r test-requirements.txt
- name: Run tests
if: ${{ matrix.python-version != '3.9' }}
if: ${{ matrix.python-version != '3.11' }}
run: |
python tests.py
- name: Run tests and coverage
if: ${{ matrix.python-version == '3.9' }}
if: ${{ matrix.python-version == '3.11' }}
run: |
coverage run tests.py
- name: Upload coverage result
if: ${{ matrix.python-version == '3.9' }}
if: ${{ matrix.python-version == '3.11' }}
uses: actions/upload-artifact@v2
with:
name: coverage-results
Expand All @@ -46,7 +46,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
python-version: '3.11'
- name: Install dependencies
run: |
pip install codecov
Expand Down
18 changes: 11 additions & 7 deletions checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,18 @@ def check_version():
with urlopen("https://raw.githubusercontent.com/modoboa/modoboa-installer/master/version.txt") as r_version:
remote_version = r_version.read().decode()
if local_version == "" or remote_version == "":
utils.printcolor("Could not check that your installer is up to date: "
f"local version: {local_version}, "
f"remote version: {remote_version}",
utils.YELLOW)
utils.printcolor(
"Could not check that your installer is up-to-date: "
f"local version: {local_version}, "
f"remote version: {remote_version}",
utils.YELLOW
)
if remote_version != local_version:
utils.error("Your installer seems outdated.\n"
"Check the README for instruction on how to update.\n"
"No support will be provided without an up to date installer!")
utils.error(
"Your installer seems outdated.\n"
"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) ")
if not answer.lower().startswith("y"):
sys.exit(0)
Expand Down

0 comments on commit fb961f9

Please sign in to comment.