🏡 index : ~doyle/titanirc.git

author Jordan Doyle <jordan@doyle.la> 2023-01-07 2:17:31.0 +00:00:00
committer Jordan Doyle <jordan@doyle.la> 2023-01-07 2:20:13.0 +00:00:00
commit
11689f89def5291ccb9f25cdd0415ace1760f331 [patch]
tree
36957c90ea1e5c84bf933cbc0600ab1db3326b39
parent
f7844edc6da50d13dad7d2e0bb909e323e330d08
download
11689f89def5291ccb9f25cdd0415ace1760f331.tar.gz

Add CI steps



Diff

 Cargo.lock                       |  1 +
 Cargo.toml                       |  2 +-
 .github/dependabot.yml           | 12 ++++++++++++
 .github/workflows/audit.yml      | 16 ++++++++++++++++
 .github/workflows/audit_cron.yml | 14 ++++++++++++++
 .github/workflows/ci.yml         | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 106 insertions(+), 1 deletion(-)

diff --git a/Cargo.lock b/Cargo.lock
index 2a19415..5872ae3 100644
--- a/Cargo.lock
+++ a/Cargo.lock
@@ -278,6 +278,7 @@
[[package]]
name = "irc-proto"
version = "0.15.0"
source = "git+https://github.com/JordanForks/irc#923e080f2408ae301135e82549cff80e92aaa844"
dependencies = [
 "bytes",
 "encoding",
diff --git a/Cargo.toml b/Cargo.toml
index 8457750..497c3dc 100644
--- a/Cargo.toml
+++ a/Cargo.toml
@@ -19,4 +19,4 @@
itertools = "0.10"

[patch."crates-io"]
irc-proto = { path = "../irc/irc-proto" }
irc-proto = { git = "https://github.com/JordanForks/irc" }
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 0000000..0dad033 100644
--- /dev/null
+++ a/.github/dependabot.yml
@@ -1,0 +1,12 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2

updates:
  - package-ecosystem: "cargo"
    directory: "/"
    schedule:
      interval: "monthly"
diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml
new file mode 100644
index 0000000..f7302be 100644
--- /dev/null
+++ a/.github/workflows/audit.yml
@@ -1,0 +1,16 @@
name: Security audit

on:
  push:
    paths:
      - '**/Cargo.toml'
      - '**/Cargo.lock'

jobs:
  security_audit:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: actions-rs/audit-check@v1
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/audit_cron.yml b/.github/workflows/audit_cron.yml
new file mode 100644
index 0000000..56de683 100644
--- /dev/null
+++ a/.github/workflows/audit_cron.yml
@@ -1,0 +1,14 @@
name: Security audit (cron)

on:
  schedule:
    - cron: '0 0 * * *'

jobs:
  audit:
    runs-on: ubuntu-latest
    steps:
      - 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 0000000..ead4831 100644
--- /dev/null
+++ a/.github/workflows/ci.yml
@@ -1,0 +1,62 @@
on: [push, pull_request]

name: CI

jobs:
  check:
    name: Check
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: stable
          override: true
      - uses: actions-rs/cargo@v1
        with:
          command: check

  test:
    name: Test Suite
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: stable
          override: true
      - uses: actions-rs/cargo@v1
        with:
          command: test

  fmt:
    name: Rustfmt
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: stable
          override: true
      - run: rustup component add rustfmt
      - uses: actions-rs/cargo@v1
        with:
          command: fmt

  clippy:
    name: Clippy
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: stable
          override: true
      - run: rustup component add clippy
      - uses: actions-rs/cargo@v1
        with:
          command: clippy