Skip to content

Merge branch 'main' of github.com:docToolchain/asciidoc-linter #10

Merge branch 'main' of github.com:docToolchain/asciidoc-linter

Merge branch 'main' of github.com:docToolchain/asciidoc-linter #10

Workflow file for this run

# ci.yml - GitHub Actions workflow for CI/CD
name: CI/CD
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9, "3.10", "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
pip install -e .[test]
- name: Run tests
run: |
python run_tests.py
- name: Upload coverage reports
uses: codecov/codecov-action@v3
if: matrix.python-version == '3.11'
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 black isort
- name: Check code style
run: |
black --check .
isort --check-only .
flake8 .
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[docs]
- name: Build documentation
run: |
cd docs
make html
- name: Deploy documentation
if: github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build/html