Skip to content

Commit

Permalink
Add CI
Browse files Browse the repository at this point in the history
  • Loading branch information
cakevm committed Oct 27, 2024
1 parent f64b677 commit 82a8b6d
Show file tree
Hide file tree
Showing 6 changed files with 310 additions and 171 deletions.
88 changes: 88 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: ci

on:
push:
branches: [main]
pull_request_target:
branches: [main]

env:
CARGO_TERM_COLOR: always

jobs:
test:
if: github.repository == 'cakevm/cowprotocol-client-rs'
name: make test
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha || github.ref }}
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2

- run: make test

fmt:
if: github.repository == 'cakevm/cowprotocol-client-rs'
name: make fmt-check
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha || github.ref }}
- uses: dtolnay/rust-toolchain@stable

- run: make fmt-check

taplo:
if: github.repository == 'cakevm/cowprotocol-client-rs'
name: make taplo-check
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha || github.ref }}
- uses: dtolnay/rust-toolchain@clippy
- run: cargo install taplo-cli --version ^0.9 --locked
- run: make taplo-check

clippy:
if: github.repository == 'cakevm/cowprotocol-client-rs'
name: make clippy
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha || github.ref }}
- uses: dtolnay/rust-toolchain@clippy
with:
toolchain: "1.82"
- uses: Swatinem/rust-cache@v2

# workaround for latest stable rust
- run: cargo +1.82 clippy --all-targets --all-features -- -D warnings

deny:
if: github.repository == 'cakevm/cowprotocol-client-rs'
name: cargo deny check
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha || github.ref }}
- uses: EmbarkStudios/cargo-deny-action@v1
with:
log-level: warn
command: check
arguments: --all-features
Loading

0 comments on commit 82a8b6d

Please sign in to comment.