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..f39e0ae --- /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.4'] + + 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 diff --git a/README.md b/README.md index 50be3ae..6286156 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Minch +[![CI](https://github.com/nmbrone/minch/actions/workflows/ci.yml/badge.svg)](https://github.com/nmbrone/minch/actions/workflows/ci.yml) + A WebSocket client build around [`Mint.WebSocket`](https://github.com/elixir-mint/mint_web_socket). ## Installation