2020-04-08 07:43:45 +02:00
|
|
|
name: CI
|
2021-02-06 16:06:48 +01:00
|
|
|
|
2021-12-12 14:13:17 +01:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
pull_request:
|
|
|
|
workflow_dispatch:
|
2020-04-08 07:43:45 +02:00
|
|
|
|
2022-04-08 01:00:53 +02:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2020-04-08 07:43:45 +02:00
|
|
|
jobs:
|
|
|
|
test:
|
2021-12-12 14:13:17 +01:00
|
|
|
name: Python ${{ matrix.python }} on ${{ matrix.os }}
|
2020-04-08 07:43:45 +02:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2020-07-19 15:13:56 +02:00
|
|
|
python:
|
2021-12-12 14:13:17 +01:00
|
|
|
- '3.7'
|
|
|
|
- '3.8'
|
|
|
|
- '3.9'
|
|
|
|
- '3.10'
|
2020-07-19 15:13:56 +02:00
|
|
|
os:
|
|
|
|
- ubuntu-latest
|
|
|
|
- macos-latest
|
|
|
|
- windows-latest
|
2020-04-08 07:43:45 +02:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Clone repository
|
2022-03-06 19:55:15 +01:00
|
|
|
uses: actions/checkout@v3
|
2020-04-08 07:43:45 +02:00
|
|
|
|
|
|
|
- name: Set up Python
|
2022-07-01 02:07:39 +02:00
|
|
|
uses: actions/setup-python@v4
|
2020-04-08 07:43:45 +02:00
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python }}
|
2022-03-12 06:47:29 +01:00
|
|
|
cache: pip
|
2020-04-08 07:43:45 +02:00
|
|
|
|
2022-03-07 07:58:22 +01:00
|
|
|
- name: Print versions
|
|
|
|
run: |
|
|
|
|
python --version
|
|
|
|
pip --version
|
2020-07-19 15:13:56 +02:00
|
|
|
|
|
|
|
- name: Install Python dependencies
|
|
|
|
run: pip install -r requirements.txt
|
|
|
|
|
|
|
|
- name: Run lint
|
2020-08-09 09:21:06 +02:00
|
|
|
run: flake8
|
2020-04-08 07:43:45 +02:00
|
|
|
|
2022-03-12 06:47:29 +01:00
|
|
|
- name: Run makeHosts.py
|
|
|
|
run: python makeHosts.py
|
|
|
|
|
2020-04-08 07:43:45 +02:00
|
|
|
- name: Run tests
|
2020-07-19 15:13:56 +02:00
|
|
|
run: python testUpdateHostsFile.py
|