isitreadonlyfriday: docs and input validation #355
Workflow file for this run
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: [pull_request] | |
jobs: | |
lint-flake8: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the repository at the current branch | |
uses: actions/checkout@v2 | |
- name: Install dependencies | |
uses: ./.github/actions/setup | |
- name: Lint with flake8 | |
run: | | |
# stop the build if there are Python syntax errors or undefined names | |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
# exit-zero treats all errors as warnings | |
flake8 . --format="::warning file=%(path)s,line=%(row)d,col=%(col)d::%(text)s" --exit-zero --max-complexity=10 | |
lint-black: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the repository at the current branch | |
uses: actions/checkout@v2 | |
- name: Install dependencies | |
uses: ./.github/actions/setup | |
- name: Lint with black | |
run: black --diff . | |
lint-pylint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the repository at the current branch | |
uses: actions/checkout@v2 | |
- name: Install dependencies | |
uses: ./.github/actions/setup | |
- name: Lint with pylint | |
run: pylint --msg-template='::warning file={path},line={line},col={column}::{msg}' */ || exit 0 | |
lint-isort: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the repository at the current branch | |
uses: actions/checkout@v2 | |
- name: Install dependencies | |
uses: ./.github/actions/setup | |
- name: Lint with isort | |
run: isort --check --diff . | |
check-json: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the repository at the current branch | |
uses: actions/checkout@v2 | |
- name: Install dependencies | |
uses: ./.github/actions/setup | |
- name: Check cog and repo JSON files against schema | |
uses: ./.github/actions/check-json | |
unit-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the repository at the current branch | |
uses: actions/checkout@v2 | |
- name: Install dependencies | |
uses: ./.github/actions/setup | |
- name: Run unit tests | |
run: python3 -m pytest . |