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 e8b88d6
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/ci-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
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@v4
with:
path: |
~/.cargo/bin/
key: ${{ runner.os }}-cargo-tools-${{ env.CARGO_BINSTALL_VERSION }}-${{ env.CARGO_TARPAULIN_VERSION }}
- 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/upload-artifact@v4
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 e8b88d6

Please sign in to comment.