Skip to content
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

Update test dependencies and add gh actions #6

Merged
merged 4 commits into from
Jul 8, 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
16 changes: 16 additions & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# ref: https://docs.codecov.com/docs/codecovyml-reference
coverage:
range: 25..100
round: down
precision: 1
status:
project:
default:
threshold: 1%

ignore:
- "tests"

comment:
layout: "files"
require_changes: yes
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: daily
- package-ecosystem: cargo
directory: /
schedule:
interval: daily
ignore:
- dependency-name: "*"
16 changes: 16 additions & 0 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Security audit
on:
schedule:
- cron: '0 0 * * *'
jobs:
audit:
runs-on: ubuntu-latest
permissions:
contents: read
checks: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
56 changes: 56 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
permissions:
contents: read
on:
push:
branches: [main]
pull_request:
name: check
jobs:
rustfmt:
runs-on: ubuntu-latest
name: fmt
steps:
- uses: actions/checkout@v4
- name: Install Rust Toolchain Components
uses: actions-rs/toolchain@v1
with:
components: clippy, rustfmt
override: true
toolchain: stable
- name: rustfmt
run: cargo fmt --all -- --check

audit:
runs-on: ubuntu-latest
permissions:
contents: read
checks: write
pull-requests: write
name: audit
steps:
- uses: actions/checkout@v4
- name: audit
uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}

clippy:
runs-on: ubuntu-latest
permissions:
contents: read
checks: write
pull-requests: write
name: clippy
steps:
- uses: actions/checkout@v4
- name: Install Rust Toolchain Components
uses: actions-rs/toolchain@v1
with:
components: clippy, rustfmt
override: true
toolchain: stable
- uses: Swatinem/rust-cache@v2
- uses: actions-rs/clippy-check@v1.0.7
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features --all-targets
39 changes: 39 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
permissions:
contents: read
on:
push:
branches: [main]
pull_request:
name: test
jobs:
unittests:
runs-on: ubuntu-latest
name: tests / stable
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
override: true
toolchain: stable
- uses: Swatinem/rust-cache@v2
- name: cargo test
run: cargo test --all-features --all-targets
coverage:
name: coverage
runs-on: ubuntu-latest
container:
image: xd009642/tarpaulin:develop-nightly
options: --security-opt seccomp=unconfined
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Generate code coverage
run: |
cargo +nightly tarpaulin --verbose --all-features --workspace --timeout 120 --out xml

- name: Upload to codecov.io
uses: codecov/codecov-action@v2
with:
# token: ${{secrets.CODECOV_TOKEN}} # not required for public repos
fail_ci_if_error: false
29 changes: 0 additions & 29 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ codecov = { repository = "zolkko/kendalls", branch = "master", service = "github
[dependencies]

[dev-dependencies]
approx = "0.4"
approx = "0.5"
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

[![crates.io](https://img.shields.io/crates/v/kendalls.svg)](https://crates.io/crates/kendalls)
[![docs.rs](https://docs.rs/kendalls/badge.svg)](https://docs.rs/kendalls)
[![Travis CI Build Status](https://travis-ci.org/zolkko/kendalls.svg?branch=master)](https://travis-ci.org/zolkko/kendalls)
[![codecov](https://codecov.io/gh/zolkko/kendalls/branch/master/graph/badge.svg)](https://codecov.io/gh/zolkko/kendalls)

[Kendall's rank correlation coefficient](https://en.wikipedia.org/wiki/Kendall_rank_correlation_coefficient)
Expand Down
Loading