mirror of
https://github.com/array-in-a-matrix/public-apis.git
synced 2025-04-02 11:11:50 -04:00
38 lines
1.1 KiB
YAML
38 lines
1.1 KiB
YAML
name: 'Tests of push & pull'
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
# push:
|
|
# branches: [ main ]
|
|
# pull_request:
|
|
# branches: [ main ]
|
|
|
|
env:
|
|
FILENAME: README.md
|
|
|
|
jobs:
|
|
tests:
|
|
name: 'Validate README.md changes'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: '3.8'
|
|
|
|
- name: Install dependencies
|
|
run: python -m pip install -r scripts/requirements.txt
|
|
|
|
- name: Validate Markdown format
|
|
run: python scripts/validate/format.py ${FILENAME}
|
|
|
|
- name: Validate pull request changes
|
|
run: scripts/github_pull_request.sh ${{ github.repository }} ${{ github.event.pull_request.number }} ${FILENAME}
|
|
if: github.event_name == 'pull_request'
|
|
|
|
- name: Checking if push changes are duplicated
|
|
run: python scripts/validate/links.py ${FILENAME} --only_duplicate_links_checker
|
|
if: github.event_name == 'push'
|