name: Elixir CI on: push: branches: [ main ] pull_request: branches: [ main ] jobs: build: name: Build and test runs-on: ubuntu-16.04 env: MIX_ENV: test strategy: fail-fast: false matrix: include: - pair: elixir: 1.6.6 otp: 19.3.6.13 - pair: elixir: 1.11.4 otp: 23.3 lint: lint steps: - uses: actions/checkout@v2 - name: Set up Elixir uses: erlef/setup-elixir@v1 with: otp-version: ${{matrix.pair.otp}} elixir-version: ${{matrix.pair.elixir}} - name: Restore dependencies cache uses: actions/cache@v2 with: path: deps key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }} restore-keys: ${{ runner.os }}-mix- - name: Install Dependencies run: mix deps.get --only test - run: mix format --check-formatted if: ${{ matrix.lint }} - run: mix deps.get && mix deps.unlock --check-unused if: ${{ matrix.lint }} - run: mix deps.compile - run: mix compile --warnings-as-errors if: ${{ matrix.lint }} - run: mix test