From e3ea322db3fd303d91b9369520f9ab40764eba2b Mon Sep 17 00:00:00 2001 From: Mike Hostetler <84222+mikehostetler@users.noreply.github.com> Date: Sun, 15 Dec 2024 21:10:22 -0700 Subject: [PATCH] Actions & Dependabot --- .github/dependabot.yml | 13 +++++++++ .github/workflows/elixir-ci.yml | 47 +++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/elixir-ci.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..b46cf28 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,13 @@ +version: 2 +updates: + - package-ecosystem: "mix" + directory: "/" + schedule: + interval: "weekly" + open-pull-requests-limit: 10 + labels: + - "dependencies" + - "elixir" + commit-message: + prefix: "deps" + include: "scope" \ No newline at end of file diff --git a/.github/workflows/elixir-ci.yml b/.github/workflows/elixir-ci.yml new file mode 100644 index 0000000..04e2c55 --- /dev/null +++ b/.github/workflows/elixir-ci.yml @@ -0,0 +1,47 @@ +name: Mix Test + +on: + pull_request: + branches: ["main"] + push: + branches: ["main"] + +permissions: + contents: read + +jobs: + test: + name: Build and test + runs-on: ubuntu-latest + strategy: + matrix: + otp: ["25.3"] + elixir: ["1.15"] + + steps: + - uses: actions/checkout@v3 + + - name: Set up Elixir + uses: erlef/setup-beam@v1 + with: + otp-version: ${{ matrix.otp }} + elixir-version: ${{ matrix.elixir }} + + - name: Restore dependencies cache + uses: actions/cache@v3 + with: + path: deps + key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }} + restore-keys: ${{ runner.os }}-mix- + + - name: Install dependencies + run: mix deps.get + + - name: Check formatting + run: mix format --check-formatted + + - name: Run tests + run: mix test + + - name: Check for unused dependencies + run: mix deps.unlock --check-unused