From 670f5a3fe92cef9fcb65e151249875940641a2fb Mon Sep 17 00:00:00 2001 From: Marco Ieni <11428655+MarcoIeni@users.noreply.github.com> Date: Sun, 22 Nov 2020 20:27:57 +0100 Subject: 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> --- .github/workflows/audit.yml | 21 ++++++++++++++++ .github/workflows/ci.yml | 59 +++++++++++++++++++++++++++++++++++++++++++++ README.md | 1 + 3 files changed, 81 insertions(+) create mode 100644 .github/workflows/audit.yml create mode 100644 .github/workflows/ci.yml 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 -- cgit v1.2.3