CI #212
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- master | |
tags-ignore: | |
- '**' | |
paths-ignore: | |
- '**.md' | |
pull_request: | |
paths-ignore: | |
- '**.md' | |
schedule: | |
- cron: '0 0 * * 0' # once in a week, docs: <https://git.io/JvxXE#onschedule> | |
jobs: # Docs: <https://help.github.com/en/articles/workflow-syntax-for-github-actions> | |
tests: | |
name: Execute provided tests | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 1 | |
- name: Build image | |
run: docker build -t markdown-lint:local -f Dockerfile . | |
- name: Execute tests | |
run: docker run --rm -t -v "$(pwd)/tests:/tests" -w "/tests" --entrypoint "" markdown-lint:local /tests/run.sh | |
docker-image: | |
name: Build docker image | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 1 | |
- name: Build image | |
run: docker build -t markdown-lint:local -f Dockerfile . | |
- name: Try to execute | |
run: docker run --rm markdown-lint:local --version | |
run-as-action: | |
name: Run action | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 1 | |
- name: Run current action using changelog file | |
uses: ./ | |
with: | |
rules: '/lint/rules/changelog.js' | |
config: '/lint/config/changelog.yml' | |
args: './CHANGELOG.md' | |
ignore: './foo ./bar' | |
env: | |
DEBUG: 'true' | |
- name: Run current action using stub markdown file | |
uses: ./ | |
with: | |
args: './tests/correct.md' | |
ignore: './foo ./bar' | |
env: | |
DEBUG: 'true' |