Skip to content

Commit

Permalink
Add transformer CICD
Browse files Browse the repository at this point in the history
  • Loading branch information
brianreicher committed Nov 18, 2023
1 parent b33510b commit ad31c10
Show file tree
Hide file tree
Showing 2 changed files with 101 additions and 0 deletions.
96 changes: 96 additions & 0 deletions .github/workflows/transformer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: Transformer

on:
push:
paths:
- "tokenizer/**"
- ".github/workflows/transformer.yml"

env:
CARGO_TERM_COLOR: always
MANIFEST_PATH: --manifest-path tokenizer/Cargo.toml

jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: test
args: ${{ env.MANIFEST_PATH }}

fmt:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add rustfmt

- uses: actions-rs/cargo@v1
with:
command: fmt
args: ${{ env.MANIFEST_PATH }} --all -- --check

clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add clippy
- uses: actions-rs/cargo@v1
with:
command: clippy
args: ${{ env.MANIFEST_PATH }} --all-targets --all-features -- -D warnings

check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: Swatinem/rust-cache@v1
with:
key: ${{ runner.os }}-check
- uses: actions-rs/cargo@v1
with:
command: check
args: ${{ env.MANIFEST_PATH }}
env:
RUSTFLAGS: -D warnings

coverage:
name: Code Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: cargo install cargo-tarpaulin
- uses: actions-rs/cargo@v1
with:
command: tarpaulin
args: ${{ env.MANIFEST_PATH }} --verbose --workspace
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,9 @@
<img src="https://github.com/GenerateNU/turbine/actions/workflows/tokenization.yml/badge.svg"
alt="Tokenization actions status" />
</a>
<!-- Transformer Actions -->
<a href="https://github.com/GenerateNU/turbine/actions/workflows/transformer.yml">
<img src="https://github.com/GenerateNU/turbine/actions/workflows/transformer.yml/badge.svg"
alt="Transformer actions status" />
</a>
</div>

0 comments on commit ad31c10

Please sign in to comment.