From 7b8a226d9deaf1d1086485f22b82328c35c80438 Mon Sep 17 00:00:00 2001 From: Geoffrey Lessel Date: Sat, 16 Sep 2023 12:00:09 -0500 Subject: [PATCH] feat: add GitHub workflow for testing Tests against the last three versions of OTP and Elixir --- .github/workflows/elixir.yml | 37 ++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/elixir.yml diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml new file mode 100644 index 0000000..442d43d --- /dev/null +++ b/.github/workflows/elixir.yml @@ -0,0 +1,37 @@ +name: Elixir CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +permissions: + contents: read + +jobs: + build: + + name: Build and test Elixir ${{matrix.elixir}} / OTP ${{matrix.otp}} + runs-on: ubuntu-latest + strategy: + matrix: + otp: ['25.3', '26.0'] + elixir: ['1.14', '1.15'] + steps: + - uses: actions/checkout@v3 + - name: Set up Elixir + uses: erlef/setup-beam@v1 + with: + elixir-version: ${{matrix.elixir}} + otp-version: ${{matrix.otp}} + - name: Restore dependencies cache + uses: actions/cache@v3 + with: + path: deps + key: ${{ runner.os }}-E${{matrix.elixir}}-O${{matrix.otp}}-mix-${{ hashFiles('**/mix.lock') }} + restore-keys: ${{ runner.os }}-E${{matrix.elixir}}-O${{matrix.otp}}-mix- + - name: Install dependencies + run: mix deps.get + - name: Run tests + run: mix test