Skip to content

Commit

Permalink
split actions
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderDokuchaev committed Mar 3, 2024
1 parent 2bee0fc commit bd537bf
Show file tree
Hide file tree
Showing 6 changed files with 107 additions and 38 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/github_action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Test GitHub Action

on:
push:
branches:
- '*'
pull_request:
types:
- opened
- reopened
- synchronize

jobs:
md-dead-link-check:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: AlexanderDokuchaev/md-dead-link-check@main
with:
config: pyproject.toml
26 changes: 26 additions & 0 deletions .github/workflows/mac.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Test MacOS

on:
push:
branches:
- '*'
pull_request:
types:
- opened
- reopened
- synchronize

jobs:
pytest:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install package
run: pip install .[dev]
- name: Pytest
run: pytest tests -rfs -vv
- name:
run: md-dead-link-check -v
24 changes: 24 additions & 0 deletions .github/workflows/precommit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Validation

on:
push:
branches:
- '*'
pull_request:
types:
- opened
- reopened
- synchronize

jobs:
pre-commit:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install pre-commit
run: pip install pre-commit==3.2.2
- name: Run pre-commit
run: pre-commit run -a
37 changes: 3 additions & 34 deletions .github/workflows/validation.yml → .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Validation
name: Test Ubuntu

on:
push:
Expand Down Expand Up @@ -37,36 +37,5 @@ jobs:
run: pip install .[dev]
- name: Pytest
run: pytest tests -rfs -vv

pytest-win:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install package
run: pip install .[dev]
- name: Pytest
run: pytest tests -rfs -vv

pytest-mac:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install package
run: pip install .[dev]
- name: Pytest
run: pytest tests -rfs -vv


md-dead-link-check:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: AlexanderDokuchaev/md-dead-link-check@main
with:
config: pyproject.toml
- name:
run: md-dead-link-check -v
26 changes: 26 additions & 0 deletions .github/workflows/win.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Test Windows

on:
push:
branches:
- '*'
pull_request:
types:
- opened
- reopened
- synchronize

jobs:
pytest:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install package
run: pip install .[dev]
- name: Pytest
run: pytest tests -rfs -vv
- name:
run: md-dead-link-check.exe -v
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@ enabling it to process thousands links in several seconds.

## Proxy

This tool leverages your system's existing HTTP and HTTPS proxy configuration. It achieves this by trusting the environment variables that your operating system utilizes to define proxy settings. This functionality is enabled by the `aiohttp.ClientSession(trust_env=True)` option.
For further technical details, you can refer to the [aiohttp documentation](https://docs.aiohttp.org/en/stable/client_advanced.html#proxy-support)
This tool leverages your system's existing HTTP and HTTPS proxy configuration.
It achieves this by trusting the environment variables that your operating system utilizes to define proxy settings.
This functionality is enabled by the `aiohttp.ClientSession(trust_env=True)` option.
For further technical details, you can refer to the
[aiohttp documentation](https://docs.aiohttp.org/en/v3.9.3/client_advanced.html#proxy-support).

## How to Use It

Expand Down Expand Up @@ -73,10 +76,11 @@ To leverage a different file, invoke the `--config` option during execution.
- timeout: Specifies the maximum time (in seconds) to wait for web link responses. Default: `10` seconds.
- exclude_links: Accepts a list of links to exclude from checks. Default: `[]`.
- exclude_files: Accepts a list of files to exclude from checks. Default: `[]`.
- check_web_links: Toggle web link checks on or off. Set to `false` to focus solely on file-based links. Default: `true`.
- check_web_links: Toggle web link checks on or off. Default: `true`.

[!TIP]
Leverage wildcard patterns ([fnmatch](https://docs.python.org/3/library/fnmatch.html) syntax) for flexible exclusions in both `exclude_links` and `exclude_files` lists.
Leverage wildcard patterns ([fnmatch](https://docs.python.org/3/library/fnmatch.html) syntax) for flexible exclusions
in both `exclude_links` and `exclude_files` lists.

```toml
[tool.md_dead_link_check]
Expand Down

0 comments on commit bd537bf

Please sign in to comment.