diff --git a/.github/workflows/c_extensions.yml b/.github/workflows/c_extensions.yml index def673f48c1..1cdbce3c97d 100644 --- a/.github/workflows/c_extensions.yml +++ b/.github/workflows/c_extensions.yml @@ -26,7 +26,7 @@ jobs: c_ext: name: C Extensions needs: pre_job - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} + if: ${{ needs.pre_job.outputs.should_skip != 'true' && github.event_name == 'pull_request' }} runs-on: ubuntu-20.04 container: image: python:2.7.18-buster @@ -66,7 +66,7 @@ jobs: no_c_ext: name: No C Extensions needs: pre_job - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} + if: ${{ needs.pre_job.outputs.should_skip != 'true' && github.event_name == 'pull_request' }} runs-on: ubuntu-20.04 container: image: python:2.7.18-buster diff --git a/.github/workflows/check_docs.yml b/.github/workflows/check_docs.yml index af9d3b73321..e3e571f31c8 100644 --- a/.github/workflows/check_docs.yml +++ b/.github/workflows/check_docs.yml @@ -26,7 +26,7 @@ jobs: docs: name: Checking docs build needs: pre_job - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} + if: ${{ needs.pre_job.outputs.should_skip != 'true' && github.event_name == 'pull_request' }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/check_licenses.yml b/.github/workflows/check_licenses.yml index 3c99eddb536..8733b8c7e35 100644 --- a/.github/workflows/check_licenses.yml +++ b/.github/workflows/check_licenses.yml @@ -26,7 +26,7 @@ jobs: licenses: name: Licenses check needs: pre_job - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} + if: ${{ needs.pre_job.outputs.should_skip != 'true' && github.event_name == 'pull_request' }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/no_zombies.yml b/.github/workflows/no_zombies.yml index eb6a435e8b6..c366da8428c 100644 --- a/.github/workflows/no_zombies.yml +++ b/.github/workflows/no_zombies.yml @@ -26,7 +26,7 @@ jobs: zombies: name: No zombies needs: pre_job - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} + if: ${{ needs.pre_job.outputs.should_skip != 'true' && github.event_name == 'pull_request' }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index bb35828756e..4493ff5f7c1 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -26,7 +26,7 @@ jobs: linting: name: All file linting needs: pre_job - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} + if: ${{ needs.pre_job.outputs.should_skip != 'true' && github.event_name == 'pull_request' }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/python2lint.yml b/.github/workflows/python2lint.yml index 5d681b98964..7aca73fd4cd 100644 --- a/.github/workflows/python2lint.yml +++ b/.github/workflows/python2lint.yml @@ -26,7 +26,7 @@ jobs: lint: name: Python 2 syntax checking needs: pre_job - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} + if: ${{ needs.pre_job.outputs.should_skip != 'true' && github.event_name == 'pull_request' }} runs-on: ubuntu-20.04 container: image: python:2.7.18-buster diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index 2e3fdb1550c..2af68655eaf 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -35,23 +35,23 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} + if: ${{ needs.pre_job.outputs.should_skip != 'true' && github.event_name == 'pull_request' }} uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Install tox - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} + if: ${{ needs.pre_job.outputs.should_skip != 'true' && github.event_name == 'pull_request' }} run: | python -m pip install --upgrade pip pip install "tox<4" - name: tox env cache - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} + if: ${{ needs.pre_job.outputs.should_skip != 'true' && github.event_name == 'pull_request' }} uses: actions/cache@v3 with: path: ${{ github.workspace }}/.tox/py${{ matrix.python-version }} key: ${{ runner.os }}-tox-py${{ matrix.python-version }}-${{ hashFiles('requirements/*.txt') }} - name: Test with tox - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} + if: ${{ needs.pre_job.outputs.should_skip != 'true' && github.event_name == 'pull_request' }} run: tox -e py${{ matrix.python-version }} unit_test27: name: Python unit tests (2.7) @@ -62,18 +62,18 @@ jobs: steps: - uses: actions/checkout@v4 - name: Install tox - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} + if: ${{ needs.pre_job.outputs.should_skip != 'true' && github.event_name == 'pull_request' }} run: | python -m pip install --upgrade pip pip install "tox<4" - name: tox env cache - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} + if: ${{ needs.pre_job.outputs.should_skip != 'true' && github.event_name == 'pull_request' }} uses: actions/cache@v3 with: path: ${{ github.workspace }}/.tox/py2.7 key: ${{ runner.os }}-tox-py2.7-${{ hashFiles('requirements/*.txt') }} - name: Test with tox - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} + if: ${{ needs.pre_job.outputs.should_skip != 'true' && github.event_name == 'pull_request' }} run: tox -e py2.7 postgres: name: Python postgres unit tests @@ -101,23 +101,23 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up Python 3.9 for Postgres - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} + if: ${{ needs.pre_job.outputs.should_skip != 'true' && github.event_name == 'pull_request' }} uses: actions/setup-python@v4 with: python-version: 3.9 - name: Install tox - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} + if: ${{ needs.pre_job.outputs.should_skip != 'true' && github.event_name == 'pull_request' }} run: | python -m pip install --upgrade pip pip install "tox<4" - name: tox env cache - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} + if: ${{ needs.pre_job.outputs.should_skip != 'true' && github.event_name == 'pull_request' }} uses: actions/cache@v3 with: path: ${{ github.workspace }}/.tox/py3.9 key: ${{ runner.os }}-tox-py3.9-${{ hashFiles('requirements/*.txt') }} - name: Test with tox - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} + if: ${{ needs.pre_job.outputs.should_skip != 'true' && github.event_name == 'pull_request' }} run: tox -e postgres macos: name: Python unit tests on Mac OS @@ -131,23 +131,23 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} + if: ${{ needs.pre_job.outputs.should_skip != 'true' && github.event_name == 'pull_request' }} uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Install tox - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} + if: ${{ needs.pre_job.outputs.should_skip != 'true' && github.event_name == 'pull_request' }} run: | python -m pip install --upgrade pip pip install "tox<4" - name: tox env cache - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} + if: ${{ needs.pre_job.outputs.should_skip != 'true' && github.event_name == 'pull_request' }} uses: actions/cache@v3 with: path: ${{ github.workspace }}/.tox/py${{ matrix.python-version }} key: ${{ runner.os }}-tox-py${{ matrix.python-version }}-${{ hashFiles('requirements/*.txt') }} - name: Test with tox - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} + if: ${{ needs.pre_job.outputs.should_skip != 'true' && github.event_name == 'pull_request' }} run: tox -e py${{ matrix.python-version }} windows: name: Python unit tests on Windows Server @@ -161,15 +161,15 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} + if: ${{ needs.pre_job.outputs.should_skip != 'true' && github.event_name == 'pull_request' }} uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Install tox - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} + if: ${{ needs.pre_job.outputs.should_skip != 'true' && github.event_name == 'pull_request' }} run: | python -m pip install --upgrade pip pip install "tox<4" - name: Test with tox - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} + if: ${{ needs.pre_job.outputs.should_skip != 'true' && github.event_name == 'pull_request' }} run: tox -e py${{ matrix.python-version }} diff --git a/.github/workflows/yarn.yml b/.github/workflows/yarn.yml index d544d8231cd..c7539dce2bf 100644 --- a/.github/workflows/yarn.yml +++ b/.github/workflows/yarn.yml @@ -26,7 +26,7 @@ jobs: test: name: Frontend tests needs: pre_job - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} + if: ${{ needs.pre_job.outputs.should_skip != 'true' && github.event_name == 'pull_request' }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4