Skip to content

Add ci workflow #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
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
48 changes: 48 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: CI

env:
TYPOS_LINK: "https://github.com/crate-ci/typos/releases/download"
TYPOS_VERSION: "1.23.4"

on:
push:
branches:
- main
pull_request: {}

jobs:
checks:
runs-on: ubuntu-latest
steps:
- name: Setup Rust
uses: tracel-ai/github-actions/actions/setup-rust@v1
with:
rust-toolchain: stable
cache-key: stable-linux
# --------------------------------------------------------------------------------
- name: Audit
run: cargo xtask check audit
# --------------------------------------------------------------------------------
- name: Format
shell: bash
env:
# work around for colors
# see: https://github.com/rust-lang/rustfmt/issues/3385
TERM: xterm-256color
run: cargo xtask check format
# --------------------------------------------------------------------------------
- name: Lint
run: cargo xtask check lint
# --------------------------------------------------------------------------------
- name: Typos
uses: tracel-ai/github-actions/actions/check-typos@v1
# --------------------------------------------------------------------------------
- name: Unit Tests
run: cargo xtask test unit
# --------------------------------------------------------------------------------
- name: Integration Tests
run: cargo xtask test integration
# --------------------------------------------------------------------------------
- name: Documentation Tests
run: cargo xtask doc tests

21 changes: 21 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: publish

on:
push:
tags:
- "v*"

jobs:
publish-tracel-xtask-macros:
uses: tracel-ai/github-actions/workflows/publish-crate.yml@v1
with:
crate: tracel-xtask-macros
secrets: inherit
# --------------------------------------------------------------------------------
publish-tracel-xtask:
uses: tracel-ai/github-actions/workflows/publish-crate.yml@v1
with:
crate: tracel-xtask
needs:
- tracel-xtask-macros
secrets: inherit
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ members = [

[workspace.package]
edition = "2021"
version = "0.1.0"
version = "1.0.0"
license = "MIT OR Apache-2.0"
readme = "README.md"

Expand Down
2 changes: 1 addition & 1 deletion crates/tracel-xtask/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ regex = { workspace = true }
serde_json = { workspace = true }
strum = { workspace = true }
tracing-subscriber = { workspace = true }
tracel-xtask-macros = { path = "../tracel-xtask-macros", version = "0.1.0" }
tracel-xtask-macros = { path = "../tracel-xtask-macros", version = "1.0.0" }

[dev-dependencies]
rstest = { workspace = true }
2 changes: 1 addition & 1 deletion xtask/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "xtask"
version = "0.1.0"
version = "1.0.0"
edition = "2021"

[dependencies]
Expand Down
1 change: 1 addition & 0 deletions xtask/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ extern crate log;

#[macros::base_commands(
Bump,
Build,
Check,
Compile,
Coverage,
Expand Down