summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Ieni <11428655+MarcoIeni@users.noreply.github.com>2020-11-22 20:27:57 +0100
committerGitHub <noreply@github.com>2020-11-22 14:27:57 -0500
commit670f5a3fe92cef9fcb65e151249875940641a2fb (patch)
tree4e135a9ab86a24cfdbb6baffdf016096d52f105c
parent47198cc9f2080755126727c775a106e73566d03a (diff)
add audit and some CI on ubuntu (#399)
* add audit and CI on ubuntu * revert Contents changes in README Signed-off-by: MarcoIeni <11428655+MarcoIeni@users.noreply.github.com> * README: restore new line Signed-off-by: MarcoIeni <11428655+MarcoIeni@users.noreply.github.com>
-rw-r--r--.github/workflows/audit.yml21
-rw-r--r--.github/workflows/ci.yml59
-rw-r--r--README.md1
3 files changed, 81 insertions, 0 deletions
diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml
new file mode 100644
index 00000000..52ea0142
--- /dev/null
+++ b/.github/workflows/audit.yml
@@ -0,0 +1,21 @@
+name: Security audit
+
+on:
+ schedule:
+ # Runs at 00:00 UTC everyday
+ - cron: '0 0 * * *'
+ push:
+ paths:
+ - '**/Cargo.toml'
+ - '**/Cargo.lock'
+
+jobs:
+ audit:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v2
+ - uses: actions-rs/audit-check@v1
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 00000000..2ad20198
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,59 @@
+on: [push, pull_request]
+name: Continuous Integration
+
+jobs:
+
+ test:
+ name: Test Suite
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v2
+ - name: Install Rust
+ uses: actions-rs/toolchain@v1
+ with:
+ toolchain: stable
+ profile: minimal
+ override: true
+ - uses: actions-rs/cargo@v1
+ with:
+ command: test
+
+ rustfmt:
+ name: Rustfmt
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v2
+ - name: Install Rust
+ uses: actions-rs/toolchain@v1
+ with:
+ toolchain: stable
+ profile: minimal
+ override: true
+ components: rustfmt
+ - name: Check formatting
+ uses: actions-rs/cargo@v1
+ with:
+ command: fmt
+ args: --all -- --check
+
+ # TODO enable this when there are no more clippy warnings:
+ # clippy:
+ # name: Clippy
+ # runs-on: ubuntu-latest
+ # steps:
+ # - name: Checkout repository
+ # uses: actions/checkout@v2
+ # - name: Install Rust
+ # uses: actions-rs/toolchain@v1
+ # with:
+ # toolchain: stable
+ # profile: minimal
+ # override: true
+ # components: clippy
+ # - name: Clippy Check
+ # uses: actions-rs/cargo@v1
+ # with:
+ # command: clippy
+ # args: -- -D warnings
diff --git a/README.md b/README.md
index 31fd8284..1c7e5b29 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,6 @@
[![Build Status](https://travis-ci.com/dandavison/delta.svg?branch=master)](https://travis-ci.com/dandavison/delta)
[![Gitter](https://badges.gitter.im/dandavison-delta/community.svg)](https://gitter.im/dandavison-delta/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
+[![CI](https://github.com/dandavison/delta/workflows/Continuous%20Integration/badge.svg)](https://github.com/dandavison/delta/actions)
## A viewer for git and diff output