From a7e192ada5e318411adddc15a51268a28f7a09a9 Mon Sep 17 00:00:00 2001 From: Sergey Snozyk Date: Fri, 28 Jul 2023 17:46:07 +0200 Subject: [PATCH] ci --- .github/dependabot.yml | 10 +++++++ .github/release.yaml | 19 +++++++++++++ .github/workflows/ci.yml | 61 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 90 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/release.yaml create mode 100644 .github/workflows/ci.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..3f084a9 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,10 @@ +version: 2 +updates: + - package-ecosystem: "mix" + directory: "/" + schedule: + interval: "daily" + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" diff --git a/.github/release.yaml b/.github/release.yaml new file mode 100644 index 0000000..b7800f6 --- /dev/null +++ b/.github/release.yaml @@ -0,0 +1,19 @@ +changelog: + exclude: + labels: + - ignore-for-release + authors: + - octocat + categories: + - title: Breaking Changes 🛠 + labels: + - breaking + - title: New Features 🎉 + labels: + - feature + - title: Fixes 🔧 + labels: + - fix + - title: Other Changes + labels: + - "*" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..c16b607 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,61 @@ +name: CI + +on: push + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + workflow: + name: OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}} + runs-on: ubuntu-latest + strategy: + matrix: + otp: ['25.3.2.4', '26.0.2'] + elixir: ['1.15.5'] + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up Elixir + uses: erlef/setup-beam@v1 + with: + otp-version: ${{ matrix.otp }} + elixir-version: ${{ matrix.elixir }} + + - name: Set up cache + uses: actions/cache@v3 + id: mix-cache + with: + path: | + deps + _build + key: ${{ runner.os }}-mix-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }} + restore-keys: | + ${{ runner.os }}-mix-${{ matrix.otp }}-${{ matrix.elixir }}- + + - name: Get deps + if: steps.mix-cache.outputs.cache-hit != 'true' + run: mix deps.get + + - name: Compile deps + if: steps.mix-cache.outputs.cache-hit != 'true' + run: mix deps.compile + + # - name: Build Dialyzer PLT(s) + # if: steps.mix-cache.outputs.cache-hit != 'true' + # run: mix dialyzer --plt + + - name: Mix compile + run: mix compile --force --warnings-as-errors + + - name: Mix format + run: mix format --check-formatted + + # - name: Dialyzer + # run: mix dialyzer --no-check + + - name: Mix test + run: mix test