From f2b4b86ccb277676715792b3005d36e76655e551 Mon Sep 17 00:00:00 2001 From: Donovan Schonknecht Date: Wed, 22 Nov 2023 18:01:54 +0200 Subject: [PATCH] Add dependabot and GH actions workflows --- .github/dependabot.yml | 12 ++++++++++++ .github/workflows/build.yml | 34 ++++++++++++++++++++++++++++++++++ .github/workflows/pr.yml | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 78 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/pr.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..56b16c3 --- /dev/null +++ b/.github/dependabot.yml @@ -0,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://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "cargo" + directory: "/" + open-pull-requests-limit: 1 + schedule: + interval: "daily" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..338e423 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,34 @@ +name: Build + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +on: + push: + branches: [main, master, production] + +env: + CARGO_TERM_COLOR: always + +jobs: + lint-and-tests: + runs-on: ubuntu-latest + steps: + - name: Check out repository + uses: actions/checkout@v3 + + - uses: actions/cache@v2 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + + - name: Build + run: cargo build --verbose + + - name: Run tests + run: cargo test --verbose + diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 0000000..dc0a6d6 --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,32 @@ +name: PR + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +on: pull_request + +env: + CARGO_TERM_COLOR: always + +jobs: + lint-and-tests: + runs-on: ubuntu-latest + steps: + - name: Check out repository + uses: actions/checkout@v3 + + - uses: actions/cache@v2 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + + - name: Build + run: cargo build --verbose + + - name: Run tests + run: cargo test --verbose +