Skip to content

Commit c260e6d

Browse files
ci: removed event_name == 'push' actions
1 parent 897ebdb commit c260e6d

File tree

1 file changed

+6
-35
lines changed

1 file changed

+6
-35
lines changed

.github/workflows/main.yml

Lines changed: 6 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
name: Main-CI-Flow
22

33
on:
4-
push:
5-
branches:
6-
- main
7-
- main-v[0-9].**
8-
tags:
9-
- v[0-9].**
10-
114
pull_request:
125
types:
136
- opened
@@ -22,7 +15,6 @@ env:
2215
EXTRA_RUST_TOOLCHAINS: nightly-2024-04-29
2316

2417
# On PR events, cancel existing CI runs on this same PR for this workflow.
25-
# Also, create different concurrency groups for different pushed commits, on push events.
2618
concurrency:
2719
group: >
2820
${{ github.workflow }}-
@@ -66,32 +58,21 @@ jobs:
6658
git diff --exit-code Cargo.lock
6759
6860
# Run code style on PR.
69-
- name: "Run TODO style pull request"
70-
if: github.event_name == 'pull_request'
61+
- name: "Run TODO style"
7162
run: scripts/named_todos.py --commit_id ${{ github.event.pull_request.base.sha }}
72-
- name: "Run clippy pull request"
73-
if: github.event_name == 'pull_request'
63+
- name: "Run clippy"
7464
run: scripts/run_tests.py --command clippy --changes_only --commit_id ${{ github.event.pull_request.base.sha }}
75-
- name: "Run cargo doc pull request"
76-
if: github.event_name == 'pull_request'
65+
- name: "Run cargo doc"
7766
run: scripts/run_tests.py --command doc --changes_only --commit_id ${{ github.event.pull_request.base.sha }}
78-
- name: "Run python code style pull request"
79-
if: github.event_name == 'pull_request'
67+
- name: "Run python code style"
8068
run: scripts/py_code_style.py
8169

82-
# Run code style on push.
70+
# Run code style
8371
- name: "Run rustfmt"
8472
# The nightly here is coupled with the one in install_rust/action.yml.
8573
# If we move the install here we can use a const.
8674
run: cargo +"$EXTRA_RUST_TOOLCHAINS" fmt --all -- --check
8775

88-
- name: "Run clippy on push"
89-
if: github.event_name == 'push'
90-
run: scripts/run_tests.py --command clippy
91-
- name: "Run cargo doc on push"
92-
if: github.event_name == 'push'
93-
run: scripts/run_tests.py --command doc
94-
9576
- name: "Run taplo"
9677
run: scripts/taplo.sh
9778
- name: Run Machete (detect unused dependencies)
@@ -129,23 +110,13 @@ jobs:
129110
run: echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" >> $GITHUB_ENV
130111
- run: pip install -r scripts/requirements.txt
131112

132-
- name: "Run tests pull request"
133-
if: github.event_name == 'pull_request'
113+
- name: "Run tests"
134114
run: |
135115
scripts/run_tests.py --command test --changes_only --include_dependencies --commit_id ${{ github.event.pull_request.base.sha }}
136116
env:
137117
SEED: 0
138118

139-
- name: "Run tests on push"
140-
if: github.event_name == 'push'
141-
# TODO(AdiY/Dori): Better support for running tests on push.
142-
run: |
143-
scripts/run_tests.py --command test
144-
env:
145-
SEED: 0
146-
147119
integration-tests-pr:
148-
if: github.event_name == 'pull_request'
149120
uses: ./.github/workflows/integration-tests.yml
150121
with:
151122
branch: ${{ github.head_ref }}

0 commit comments

Comments
 (0)