Skip to content

Commit

Permalink
initial commit (#1)
Browse files Browse the repository at this point in the history
* initial commit

* initial commit
  • Loading branch information
Geoffrey Borough authored Feb 26, 2024
1 parent 3c95986 commit 95e9946
Show file tree
Hide file tree
Showing 118 changed files with 72,568 additions and 4 deletions.
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: 2
updates:
- package-ecosystem: cargo
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10

- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
123 changes: 123 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
name: CI

run-name: "CI run '${{ github.head_ref || github.ref_name }}'"

on:
workflow_dispatch:
push:
branches:
- main
pull_request:

concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true

jobs:
format:
name: Cargo format
runs-on: ubuntu-latest
steps:

- name: Install toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.76.0
components: rustfmt

- name: Checkout source
uses: actions/checkout@v4

- name: Setup cache
uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}

- name: Check format
run: cargo fmt --all

security-check:
name: Security check
runs-on: ubuntu-latest
steps:

- name: Install toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.76.0
components: rustfmt

- name: Checkout sources
uses: actions/checkout@v4

- name: Install cargo-deny
run: cargo install cargo-deny --locked

- name: Install cargo-vet
run: cargo install cargo-vet --locked

- name: Run cargo deny
run: cargo deny check

- name: Run cargo vet
run: cargo vet init && cargo vet

- name: Report failure
if: failure()
run: |
echo "## Security Check Failed" >> $GITHUB_STEP_SUMMARY
clippy:
name: Check clippy
runs-on: ubuntu-latest
steps:

- name: Install toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.76.0
components: clippy

- name: Checkout sources
uses: actions/checkout@v4

- name: Setup cache
uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}

- name: Install dependencies
run: |
sudo apt-get -y update
sudo apt-get -y install npm
npm install -g quicktype
- name: Run clippy
run: cargo clippy -- -D warnings

build-test:
name: Cargo test
runs-on: ubuntu-latest
steps:

- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.76.0

- name: Checkout sources
uses: actions/checkout@v4

- name: Setup cache
uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}

- name: Install dependencies
run: |
sudo apt-get -y update
sudo apt-get -y install npm
npm install -g quicktype
- name: Run test
run: cargo test
Loading

0 comments on commit 95e9946

Please sign in to comment.