diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml new file mode 100644 index 0000000..36abc06 --- /dev/null +++ b/.github/workflows/elixir.yml @@ -0,0 +1,34 @@ +name: Elixir CI + +on: + pull_request: + push: + branches: [main] + +permissions: + contents: read + +env: + MIX_ENV: test + +jobs: + build: + name: Build and test + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v3 + - name: Set up Elixir + uses: erlef/setup-beam@v1 + with: + elixir-version: '1.15.0' # Define the elixir version [required] + otp-version: '25.0' # Define the OTP version [required] + - 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: Run tests + run: mix test