Skip to content

ci: refactor cargo build and cargo clippy workflow#1350

Merged
Flouse merged 4 commits intomainfrom
refactor-ci
Aug 23, 2023
Merged

ci: refactor cargo build and cargo clippy workflow#1350
Flouse merged 4 commits intomainfrom
refactor-ci

Conversation

@Flouse
Copy link
Copy Markdown
Contributor

@Flouse Flouse commented Aug 23, 2023

What this PR does / why we need it?

  1. ci: build.yml won't need to be triggered by push event
    Because build.yml has been triggered by axon-start-with-short-genesis.yml,
    it won't be triggered by push and pull_request events.

  2. ci(clippy): just cache cargo and finish clippy quickly

    • clear the complicated ci steps in clippy.yml -> let's keep things simple
    • use concurrency ensure that only a clippy job will run in a group
  3. start-test ci: only upload logs to GitHub artifact when the test failed
    Because [bug] Yet another slow/broken artifacts upload actions/upload-artifact#429

What is the impact of this PR?

No Breaking Change

CI Settings

CI Usage

Tip: Check the CI you want to run below, and then comment /run-ci.

CI Switch

  • Cargo Clippy
  • Coverage Test
  • E2E Tests
  • Code Format
  • Unit Tests
  • Web3 Compatible Tests
  • OCT 1-5 And 12-15
  • OCT 6-10
  • OCT 11
  • OCT 16-19
  • v3 Core Tests

CI Description

CI Name Description
Chaos CI Test the liveness and robustness of Axon under terrible network condition
Cargo Clippy Run cargo clippy --all --all-targets --all-features
Coverage Test Get the unit test coverage report
E2E Test Run end-to-end test to check interfaces
Code Format Run cargo +nightly fmt --all -- --check and cargo sort -gwc
Web3 Compatible Test Test the Web3 compatibility of Axon
v3 Core Test Run the compatibility tests provided by Uniswap V3
OCT 1-5 | 6-10 | 11 | 12-15 | 16-19 Run the compatibility tests provided by OpenZeppelin

build.yml has been triggered by axon-start-with-short-genesis.yml,
so it won't be triggered by push and pull_request events.
@Flouse Flouse added rust Pull requests that update Rust code skip_changelog refactor chore labels Aug 23, 2023
@Flouse Flouse self-assigned this Aug 23, 2023
@Flouse Flouse requested a review from a team as a code owner August 23, 2023 09:17
@Flouse Flouse requested review from blckngm and jjyr August 23, 2023 09:17
@Flouse Flouse requested review from KaoImin and chaoticlonghair and removed request for blckngm and jjyr August 23, 2023 09:19
@Flouse Flouse enabled auto-merge August 23, 2023 10:06
@Flouse Flouse added this pull request to the merge queue Aug 23, 2023
Merged via the queue into main with commit 01e7b33 Aug 23, 2023
@Flouse Flouse deleted the refactor-ci branch August 23, 2023 14:14
@Flouse Flouse mentioned this pull request Aug 23, 2023
9 tasks
KaoImin pushed a commit that referenced this pull request Aug 25, 2023
<!--  Thanks for sending a pull request! -->

## What this PR does / why we need it?

1. ci: `build.yml` won't need to be triggered by push event
Because `build.yml` has been triggered by
axon-start-with-short-genesis.yml,
   it won't be triggered by push and pull_request events.

2. ci(clippy): just cache cargo and finish `clippy` quickly
- clear the complicated ci steps in `clippy.yml` -> let's keep things
simple
   - use concurrency ensure that only a clippy job will run in a group

3. start-test ci: only upload logs to GitHub artifact when the test
failed
   Because actions/upload-artifact#429

### What is the impact of this PR?

No Breaking Change

<!--
**Special notes for your reviewer**:
NIL

**PR relation**:
- Ref #

**Which issue(s) this PR fixes**:
You could link a pull request to an issue by using a supported keyword
in the pull request's description or in a commit message.

- Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
see [Linking a pull request to an issue using a
keyword](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword)
or [Manually linking a pull request to an issue using the pull request
sidebar](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#manually-linking-a-pull-request-or-branch-to-an-issue-using-the-issue-sidebar)

-->

<details><summary>CI Settings</summary><br/>

<!--  Have I run `make ci`? -->
### **CI Usage**

**Tip**: Check the CI you want to run below, and then comment `/run-ci`.

**CI Switch**

- [ ] Cargo Clippy
- [ ] Coverage Test
- [ ] E2E Tests
- [ ] Code Format
- [ ] Unit Tests
- [ ] Web3 Compatible Tests
- [ ] OCT 1-5 And 12-15
- [ ] OCT 6-10
- [ ] OCT 11
- [ ] OCT 16-19
- [ ] v3 Core Tests

### **CI Description**

| CI Name | Description |
| ----------------------------------------- |
-------------------------------------------------------------------------
|
| *Chaos CI* | Test the liveness and robustness of Axon under terrible
network condition |
| *Cargo Clippy* | Run `cargo clippy --all --all-targets --all-features`
|
| *Coverage Test* | Get the unit test coverage report |
| *E2E Test* | Run end-to-end test to check interfaces |
| *Code Format* | Run `cargo +nightly fmt --all -- --check` and `cargo
sort -gwc` |
| *Web3 Compatible Test* | Test the Web3 compatibility of Axon |
| *v3 Core Test* | Run the compatibility tests provided by Uniswap V3 |
| *OCT 1-5 \| 6-10 \| 11 \| 12-15 \| 16-19* | Run the compatibility
tests provided by OpenZeppelin |

<!--
#### Deprecated CIs
- [ ] Chaos CI
-->
</details>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore refactor rust Pull requests that update Rust code skip_changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants