From a45fdea8e0ff15d404cb5085af9619c03c02e9c9 Mon Sep 17 00:00:00 2001 From: Lala Sabathil Date: Tue, 25 Apr 2023 20:12:41 +0200 Subject: [PATCH 1/6] chore(actions): run jobs only for given targets to avoid spam --- .github/workflows/check.yml | 6 +++- .github/workflows/codeql-analysis.yml | 5 +-- .github/workflows/docs.yml | 45 +++++++++++++++++++++++++++ .github/workflows/lint.yml | 17 +++++++++- .github/workflows/test.yml | 35 +++++++-------------- .github/workflows/todo.yml | 8 ++++- 6 files changed, 87 insertions(+), 29 deletions(-) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index d64c44f2a5..96bbefbfa9 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 63eb6a6ff7..260bc99104 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..cc045e8890 --- /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@v3.1.0 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + 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 \ No newline at end of file diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index eebcd0b41e..9194f81a01 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 0fe3702d7d..f4f21012ce 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: @@ -59,27 +70,3 @@ jobs: name: codecov-umbrella fail_ci_if_error: true verbose: true - docs: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3.1.0 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - 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 15d85e18b3..738e2a0618 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 From af22469476fcdbfcbaf19fe76d35bd2731a5d659 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 25 Apr 2023 18:13:12 +0000 Subject: [PATCH 2/6] style(pre-commit): auto fixes from pre-commit.com hooks --- .github/workflows/check.yml | 2 +- .github/workflows/docs.yml | 80 ++++++++++++++++++------------------- .github/workflows/lint.yml | 2 +- .github/workflows/test.yml | 14 +++---- .github/workflows/todo.yml | 2 +- 5 files changed, 50 insertions(+), 50 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 96bbefbfa9..731d10f8f9 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -2,7 +2,7 @@ name: Checks on: push: pull_request: - branches: [ master ] + branches: [master] workflow_dispatch: concurrency: diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index cc045e8890..cb2d7fa267 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,45 +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: + 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@v3.1.0 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - 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 \ No newline at end of file + docs: + name: "Build Docs" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3.1.0 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + 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 9194f81a01..03c4570e38 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -8,7 +8,7 @@ on: - "test/**" - "requirements/**" pull_request: - branches: [ master ] + branches: [master] paths: - "docs/**" - "discord/**" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f4f21012ce..0f7ea09ec7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,15 +3,15 @@ name: Unit Tests on: push: paths: - - "discord/**" - - "test/**" - - "requirements/**" + - "discord/**" + - "test/**" + - "requirements/**" pull_request: - branches: [ master ] + branches: [master] paths: - - "discord/**" - - "test/**" - - "requirements/**" + - "discord/**" + - "test/**" + - "requirements/**" schedule: - cron: "0 0 * * *" workflow_dispatch: diff --git a/.github/workflows/todo.yml b/.github/workflows/todo.yml index 738e2a0618..309aec71a6 100644 --- a/.github/workflows/todo.yml +++ b/.github/workflows/todo.yml @@ -3,7 +3,7 @@ name: Check TODO on: push: pull_request: - branches: [ master ] + branches: [master] workflow_dispatch: jobs: From a4f480b3949e0bf5b2a4e3de167dc4f9abea52e7 Mon Sep 17 00:00:00 2001 From: Lala Sabathil Date: Tue, 25 Apr 2023 20:19:04 +0200 Subject: [PATCH 3/6] fix(actions): missing matrix for docs --- .github/workflows/docs.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index cb2d7fa267..c57bea66e2 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -21,6 +21,9 @@ jobs: docs: name: "Build Docs" runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.8", "3.9", "3.10", "3.11"] steps: - uses: actions/checkout@v3.1.0 - name: Set up Python ${{ matrix.python-version }} From aa03ed4f17dd28b2c6afbaa365c7854bd168f50f Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 21 Jan 2024 06:47:00 +0000 Subject: [PATCH 4/6] style(pre-commit): auto fixes from pre-commit.com hooks --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 03675777d7..34ef3819a5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -55,4 +55,4 @@ jobs: # 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 . --count --exit-zero --max-complexity=10 --max-line-length=120 --statistics \ No newline at end of file + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=120 --statistics From 78e33449a222d71cad353014d8a919b2116dc637 Mon Sep 17 00:00:00 2001 From: Dorukyum <53639936+Dorukyum@users.noreply.github.com> Date: Sun, 21 Jan 2024 09:48:24 +0300 Subject: [PATCH 5/6] chore: update docs build Signed-off-by: Dorukyum <53639936+Dorukyum@users.noreply.github.com> --- .github/workflows/docs.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index c57bea66e2..6acd6bb6cd 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -19,15 +19,11 @@ on: jobs: docs: - name: "Build Docs" runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] steps: - - uses: actions/checkout@v3.1.0 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.8" cache: "pip" From 0e9adc55d8941b562b8fd78408cec8549eb1d489 Mon Sep 17 00:00:00 2001 From: Lala Sabathil Date: Sun, 21 Jan 2024 07:50:33 +0100 Subject: [PATCH 6/6] fix(actions): re-add job name & remove matrix completly Signed-off-by: Lala Sabathil --- .github/workflows/docs.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 6acd6bb6cd..5015de9cdd 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -19,10 +19,11 @@ on: jobs: docs: + name: "Build Docs" runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} + - name: Set up Python 3.8 uses: actions/setup-python@v5 with: python-version: "3.8"