Add code style check and fix commands #202
Workflow file for this run
This file contains 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: Tests | |
on: push | |
jobs: | |
setup: | |
name: Setup Environment | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.8 | |
cache: 'pip' | |
- run: pip install -r requirements.txt | |
code-style: | |
name: Code style | |
runs-on: ubuntu-latest | |
needs: setup | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check | |
run: black . --check | |
duplicates: | |
name: No duplicate domains in list | |
runs-on: ubuntu-latest | |
needs: setup | |
continue-on-error: true | |
steps: | |
- name: Install pytest | |
run: pip install pytest | |
- name: Check for duplicate lines | |
run: | | |
cd scripts | |
python3 tests.py --type duplicates | |
regex: | |
name: No regex domains in list | |
runs-on: ubuntu-latest | |
needs: setup | |
continue-on-error: true | |
steps: | |
- name: Install pytest | |
run: pip install pytest | |
- name: Check if list includes regex domains | |
run: | | |
cd scripts | |
python3 tests.py --type regex | |
unbound: | |
name: Check Unbound list | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Unbound | |
run: sudo apt-get update && sudo apt-get install -y unbound | |
- name: Check unbound list | |
run: unbound-checkconf unbound.conf |