diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 8462f34514..8cb027b3e0 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -1,5 +1,9 @@ name: Checks -on: [pull_request, push] +on: + push: + pull_request: + branches: [master] + workflow_dispatch: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 4fbb2b5b8a..b6f37043ae 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -12,10 +12,11 @@ name: "CodeQL" on: - push: null - pull_request: null + push: + pull_request: schedule: - cron: "26 6 * * 6" + workflow_dispatch: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000000..5015de9cdd --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,45 @@ +name: Docs Tests + +on: + push: + paths: + - "docs/**" + - "discord/**" + - "test/**" + - "requirements/**" + pull_request: + paths: + - "docs/**" + - "discord/**" + - "test/**" + - "requirements/**" + schedule: + - cron: "0 0 * * *" + workflow_dispatch: + +jobs: + docs: + name: "Build Docs" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python 3.8 + uses: actions/setup-python@v5 + with: + python-version: "3.8" + cache: "pip" + cache-dependency-path: "requirements/docs.txt" + check-latest: true + - name: Install dependencies + run: | + python -m pip install -U pip + pip install ".[docs]" + - name: Check Links + if: github.event_name == 'schedule' + run: | + cd docs + make linkcheck + - name: Compile to html + run: | + cd docs + make html diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index d7238f4c3c..a2b500e271 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,5 +1,20 @@ name: Type Check and Lint -on: [push, pull_request] + +on: + push: + paths: + - "docs/**" + - "discord/**" + - "test/**" + - "requirements/**" + pull_request: + branches: [master] + paths: + - "docs/**" + - "discord/**" + - "test/**" + - "requirements/**" + workflow_dispatch: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index aa77843552..34ef3819a5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,9 +2,19 @@ name: Unit Tests on: push: + paths: + - "discord/**" + - "test/**" + - "requirements/**" pull_request: + branches: [master] + paths: + - "discord/**" + - "test/**" + - "requirements/**" schedule: - cron: "0 0 * * *" + workflow_dispatch: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} @@ -12,6 +22,7 @@ concurrency: jobs: pytest: + name: "Test build with matrix" runs-on: ${{ matrix.os }} strategy: matrix: @@ -45,27 +56,3 @@ jobs: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics # exit-zero treats all errors as warnings. flake8 . --count --exit-zero --max-complexity=10 --max-line-length=120 --statistics - docs: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: "3.8" - cache: "pip" - cache-dependency-path: "requirements/docs.txt" - check-latest: true - - name: Install dependencies - run: | - python -m pip install -U pip - pip install ".[docs]" - - name: Check Links - if: github.event_name == 'schedule' - run: | - cd docs - make linkcheck - - name: Compile to html - run: | - cd docs - make html diff --git a/.github/workflows/todo.yml b/.github/workflows/todo.yml index 508f34218f..9f827fcfd3 100644 --- a/.github/workflows/todo.yml +++ b/.github/workflows/todo.yml @@ -1,5 +1,11 @@ name: Check TODO -on: [push, pull_request] + +on: + push: + pull_request: + branches: [master] + workflow_dispatch: + jobs: todo: runs-on: ubuntu-latest