Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 6 additions & 35 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
name: Main-CI-Flow

on:
push:
branches:
- main
- main-v[0-9].**
tags:
- v[0-9].**

pull_request:
types:
- opened
Expand All @@ -22,7 +15,6 @@ env:
EXTRA_RUST_TOOLCHAINS: nightly-2024-04-29

# On PR events, cancel existing CI runs on this same PR for this workflow.
# Also, create different concurrency groups for different pushed commits, on push events.
concurrency:
group: >
${{ github.workflow }}-
Expand Down Expand Up @@ -66,32 +58,21 @@ jobs:
git diff --exit-code Cargo.lock

# Run code style on PR.
- name: "Run TODO style pull request"
if: github.event_name == 'pull_request'
- name: "Run TODO style"
run: scripts/named_todos.py --commit_id ${{ github.event.pull_request.base.sha }}
- name: "Run clippy pull request"
if: github.event_name == 'pull_request'
- name: "Run clippy"
run: scripts/run_tests.py --command clippy --changes_only --commit_id ${{ github.event.pull_request.base.sha }}
- name: "Run cargo doc pull request"
if: github.event_name == 'pull_request'
- name: "Run cargo doc"
run: scripts/run_tests.py --command doc --changes_only --commit_id ${{ github.event.pull_request.base.sha }}
- name: "Run python code style pull request"
if: github.event_name == 'pull_request'
- name: "Run python code style"
run: scripts/py_code_style.py

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

- name: "Run clippy on push"
if: github.event_name == 'push'
run: scripts/run_tests.py --command clippy
- name: "Run cargo doc on push"
if: github.event_name == 'push'
run: scripts/run_tests.py --command doc

- name: "Run taplo"
run: scripts/taplo.sh
- name: Run Machete (detect unused dependencies)
Expand Down Expand Up @@ -129,23 +110,13 @@ jobs:
run: echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" >> $GITHUB_ENV
- run: pip install -r scripts/requirements.txt

- name: "Run tests pull request"
if: github.event_name == 'pull_request'
- name: "Run tests"
run: |
scripts/run_tests.py --command test --changes_only --include_dependencies --commit_id ${{ github.event.pull_request.base.sha }}
env:
SEED: 0

- name: "Run tests on push"
if: github.event_name == 'push'
# TODO(AdiY/Dori): Better support for running tests on push.
run: |
scripts/run_tests.py --command test
env:
SEED: 0

integration-tests-pr:
if: github.event_name == 'pull_request'
uses: ./.github/workflows/integration-tests.yml
with:
branch: ${{ github.head_ref }}
Expand Down
Loading