Skip to content

tests

tests #108

Workflow file for this run

name: tests
on:
push:
pull_request:
schedule:
# At 12:55 every Saturday
- cron: '55 12 * * 6'
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: psf/black@stable
with:
options: "--check"
- name: Install Python 3
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
pip install flake8
- name: flake8
run: |
flake8 --select F,E722 --ignore F403,F405,F541
refresh_nameservers:
runs-on: ubuntu-latest
needs: lint
# if: github.event_name == 'schedule'
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
pip install poetry
poetry install
- name: Refresh nameservers.txt
run: poetry run python public_dns_servers/clean_nameservers.py
- name: git add nameservers.txt
uses: EndBug/add-and-commit@v9
with:
add: "nameservers.txt"
default_author: github_actions
message: "refresh nameservers.txt"