improving the approach of handling boolean options #1050
This file contains hidden or 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 the eduroam linux installer | |
| # Trigger the workflow on push or pull request | |
| on: [push, pull_request] | |
| permissions: | |
| contents: read | |
| jobs: | |
| python_linting: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.11"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| - name: Lint with flake8 and pylint | |
| run: | | |
| pip install flake8 | |
| flake8 devices/linux/Files/main.py --count --exit-zero | |
| pip install pylint | |
| pylint devices/linux/Files/main.py --exit-zero | |
| - name: Lint with ruff | |
| run: | | |
| pip install ruff | |
| ruff check | |
| create_test_data_ttls: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - shell: bash | |
| run: | | |
| cat << EOF > create_test_data_ttls.txt | |
| Messages.quit = "Really quit?" | |
| Messages.username_prompt = "enter your userid" | |
| Messages.enter_password = "enter password" | |
| EOF | |
| mkdir -p artifacts/ | |
| - name: Create config file | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: configuration | |
| path: create_test_data_ttls.txt | |
| test_ubuntu_previous: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| max-parallel: 5 | |
| matrix: | |
| os: [ubuntu-22.04] | |
| python-version: ["3.7", "3.8", "3.9"] | |
| needs: [create_test_data_ttls] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r devices/linux/Files/requirements.txt | |
| - name: Test installer | |
| uses: actions/[email protected] | |
| with: | |
| name: configuration | |
| - shell: bash | |
| run: | | |
| cat create_test_data_ttls.txt >> devices/linux/Files/main.py | |
| echo "run_installer()" >> devices/linux/Files/main.py | |
| cd devices/linux/Files/ | |
| python main.py -d -s --username eduroam_user --password eduroam_password | |
| test_ubuntu_24: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| max-parallel: 5 | |
| matrix: | |
| os: [ubuntu-24.04] | |
| python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] | |
| needs: [create_test_data_ttls] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r devices/linux/Files/requirements.txt | |
| - name: Test installer | |
| uses: actions/[email protected] | |
| with: | |
| name: configuration | |
| - shell: bash | |
| run: | | |
| cat create_test_data_ttls.txt >> devices/linux/Files/main.py | |
| echo "run_installer()" >> devices/linux/Files/main.py | |
| cd devices/linux/Files/ | |
| python main.py -d -s --username eduroam_user --password eduroam_password |