Skip to content

Test aiodnsprox

Test aiodnsprox #689

Workflow file for this run

name: Test aiodnsprox
on:
schedule:
- cron: '15 1 * * *'
push:
branches:
- main
tags:
- '*'
pull_request:
branches:
- main
workflow_dispatch:
inputs:
ref:
description: 'Git ref to checkout'
required: true
default: 'main'
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10']
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.ref }}
# Required for Upload doc step
- name: Setup git config
run: |
git config user.name "GitHub Actions Bot"
git config user.email "<>"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install "tox<4"
sudo apt-get update
sudo apt-get install -y tmux dnsmasq
- name: Test with tox
run: |
pyenv="py$(echo "${{ matrix.python-version }}" | tr -d '.')"
tox -e flake8,pylint,${pyenv}-test
- name: Build doc
if: matrix.python-version == 3.9
run: |
tox -e build-doc
- name: Upload Coverage to Codecov
uses: codecov/[email protected]
with:
flags: ${{ matrix.python-version }}
- name: Upload doc
if: matrix.python-version == 3.9
run: |
git fetch origin gh_pages
git checkout gh_pages
cp -r docs/build/html/* docs/
rm -rf docs/build
git add docs/
git commit --author="Github Actions Bot <>" -m "Update docs" && \
git push origin gh_pages || exit 0