diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..d9f596c --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,3 @@ +# These are supported funding model platforms + +github: [ikeycode] diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..ec32784 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,15 @@ +# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "cargo" + directory: "/" + schedule: + interval: "weekly" + day: "tuesday" + time: "10:00" + timezone: "Europe/London" + groups: + cargo: + patterns: + - "*" diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..7ebadfe --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,52 @@ +name: CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + schedule: + - cron: '30 2 * * *' + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + runs-on: ubuntu-latest + name: Build & Test Project + + steps: + - name: Checkout source + uses: actions/checkout@v4 + + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + with: + components: rustfmt, clippy + + - name: Check Formatting + run: cargo fmt --all -- --check + + - name: Cargo Cache + uses: actions/cache@v3 + with: + path: | + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + + - name: Build project + run: cargo build + + - name: Test project + run: cargo test --workspace + + - name: Run clippy + uses: giraffate/clippy-action@v1 + with: + reporter: 'github-pr-check' + clippy_flags: --workspace --no-deps + filter_mode: nofilter + github_token: ${{ secrets.GITHUB_TOKEN }}