Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Javagedes committed Oct 5, 2024
0 parents commit 7736b6f
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/ci-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

env:
CARGO_BINSTALL_VERSION: '1.1.0'
CARGO_TARPAULIN_VERSION: '0.31.2'

jobs:
setup:
name: Setup Environment

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Cache
uses: actions/cache@4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}i
- name: Install Cargo dependencies
run: |
cargo install cargo-binstall --version $CARGO_BINSTALL_VERSION || true
cargo binstall cargo-tarpaulin --version $CARGO_TARPAULIN_VERSION || true
- name: Run cargo-fmt
run: cargo fmt --all --check

- name: Run cargo-clippy
run: cargo clippy

- name: Run cargo-tarpaulin
run: cargo tarpaulin --out Xml --timeout 180

- name: Upload Code coverage
uses: actions/uplaod-artifact@4
with:
name: code-coverage-report
path: cobertura.xml
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target
6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[package]
name = "rust-ci-testing"
version = "0.1.0"
edition = "2021"

[dependencies]
3 changes: 3 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}

0 comments on commit 7736b6f

Please sign in to comment.