2021-06-29 14:57:56 +02:00
|
|
|
name: Pull Request Checks
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
2021-06-30 23:40:03 +02:00
|
|
|
branches: [ master ]
|
2021-07-01 02:48:26 +02:00
|
|
|
workflow_dispatch:
|
2021-06-29 14:57:56 +02:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
check_syntax:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2021-07-01 02:48:26 +02:00
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
- name: create diff
|
|
|
|
run: git diff origin/master -U0 README.md | grep --perl-regexp --only-matching "(?<=^\+).*" > temp.md
|
2021-06-29 14:57:56 +02:00
|
|
|
- name: Use Node.js
|
|
|
|
uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: '14.x'
|
2021-07-01 02:48:26 +02:00
|
|
|
- name: install chalk
|
2021-06-29 14:57:56 +02:00
|
|
|
run: |
|
2021-06-30 23:49:40 +02:00
|
|
|
cd tests
|
2021-06-29 14:57:56 +02:00
|
|
|
npm install chalk
|
|
|
|
cd ..
|
2021-07-01 02:48:26 +02:00
|
|
|
- name: Checks
|
|
|
|
run: script -e -c 'node tests/test.js -r README.md -d temp.md'
|
2021-06-29 14:57:56 +02:00
|
|
|
|
|
|
|
check_links:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2021-07-01 02:48:26 +02:00
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
- name: create diff
|
|
|
|
run: git diff origin/master -U0 README.md | grep --perl-regexp --only-matching "(?<=^\+).*" > temp.md
|
2021-06-29 14:57:56 +02:00
|
|
|
- name: Set up Ruby 2.6
|
|
|
|
uses: actions/setup-ruby@v1
|
|
|
|
with:
|
|
|
|
ruby-version: 2.6.x
|
2021-07-01 02:48:26 +02:00
|
|
|
- name: install awesome_bot
|
|
|
|
run: gem install awesome_bot
|
2021-06-29 14:57:56 +02:00
|
|
|
- name: Checks
|
2021-07-01 02:48:26 +02:00
|
|
|
run: awesome_bot -f temp.md --allow-redirect --skip-save-results --allow 202 --white-list < tests/link_whitelist.txt
|
2021-06-29 14:57:56 +02:00
|
|
|
|