-
Notifications
You must be signed in to change notification settings - Fork 52
132 lines (127 loc) · 4.19 KB
/
linux_tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
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-22.04
strategy:
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
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
create_test_data_ttls:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- 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@v3
with:
name: configuration
path: create_test_data_ttls.txt
test_ubuntu_previous:
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 5
matrix:
os: [ubuntu-20.04]
python-version: ["3.6", "3.7", "3.8", "3.9"]
needs: [create_test_data_ttls]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
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/download-artifact@v3
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_22:
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 5
matrix:
os: [ubuntu-22.04]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
needs: [create_test_data_ttls]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
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/download-artifact@v3
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_22:
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@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
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/download-artifact@v3
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