From ed53fefb7530ca8be65eeebeb687cc5674a39992 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Sun, 8 Oct 2023 19:28:09 +0200 Subject: [PATCH] CI: Run on PRs and merges This is the same pattern we use in our other repos. --- .github/workflows/build-docs.yml | 23 ----------------------- .github/workflows/tests.yml | 25 ++++++++++++++++++++++++- 2 files changed, 24 insertions(+), 24 deletions(-) delete mode 100644 .github/workflows/build-docs.yml diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml deleted file mode 100644 index 3aa4424..0000000 --- a/.github/workflows/build-docs.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: build docs - -on: [push, pull_request] - -jobs: - build-docs: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - name: Set up Python 3.11 - uses: actions/setup-python@v4 - with: - python-version: 3.11 - - name: Install dependencies - run: | - pip install --upgrade -r docs/requirements.txt - python setup.py develop - - name: Build docs - run: | - cd docs - make html diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 700d7b8..b5d84c4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,6 +1,11 @@ name: tests (unit) -on: [push, pull_request] +on: + pull_request: {} + push: + branches: + - master + - main jobs: test: @@ -53,11 +58,29 @@ jobs: - name: Run bandit run: | bandit -r pypuppetdb + + build-docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python 3.11 + uses: actions/setup-python@v4 + with: + python-version: 3.11 + - name: Install dependencies + run: | + pip install --upgrade -r docs/requirements.txt + python setup.py develop + - name: Build docs + run: | + cd docs + make html tests: needs: - test - black-formatting - security + - build-docs runs-on: ubuntu-latest name: Test suite steps: