Skip to content

Commit

Permalink
Upgrade CI runner machine
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelotto committed Nov 22, 2021
1 parent a281394 commit ccbab7b
Showing 1 changed file with 43 additions and 49 deletions.
92 changes: 43 additions & 49 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,75 +1,69 @@
name: CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
push:
branches:
- master

jobs:
format:
name: Check Formatting
runs-on: ubuntu-16.04
steps:
- uses: actions/checkout@v2

- name: Set up Elixir
uses: erlef/setup-elixir@v1
with:
otp-version: 22.2
elixir-version: 1.10.4

- name: Install dependencies
run: mix deps.get

- name: Run "mix format"
run: mix format --check-formatted

test:
name: Build and test
runs-on: ubuntu-16.04
runs-on: ubuntu-18.04
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
strategy:
fail-fast: false
matrix:
pair:
- erlang: 23.1
elixir: 1.11.1
- erlang: 22.2
elixir: 1.11.1
- erlang: 21.3
elixir: 1.11.1
- erlang: 22.2
elixir: 1.10.4
- erlang: 21.3
elixir: 1.9.4
- erlang: 21.3
elixir: 1.8.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
include:
- pair:
elixir: 1.8.2
otp: 21.3
- pair:
elixir: 1.9.4
otp: 21.3
- pair:
elixir: 1.10.4
otp: 21.3
- pair:
elixir: 1.11.3
otp: 22.2
- pair:
elixir: 1.12.3
otp: 23.2.5
- pair:
elixir: 1.12.3
otp: 24.1.3
lint: lint
steps:
- uses: actions/checkout@v2

- name: Set up Elixir
uses: erlef/setup-elixir@v1
- uses: erlef/setup-elixir@v1
with:
otp-version: ${{matrix.pair.erlang}}
otp-version: ${{matrix.pair.otp}}
elixir-version: ${{matrix.pair.elixir}}

- name: Install dependencies
run: |
mix local.hex --force
mix local.rebar --force
mix deps.get
- name: Install Dependencies
run: mix deps.get

- 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 }}

- name: Run tests
run: MIX_ENV=test mix coveralls.github
- run: MIX_ENV=test mix coveralls.github

- name: Retrieve PLT Cache
uses: actions/cache@v1
id: plt-cache
with:
path: priv/plts
key: ${{ runner.os }}-${{ matrix.pair.erlang }}-${{ matrix.pair.elixir }}-plts-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
key: ${{ runner.os }}-${{ matrix.pair.otp }}-${{ matrix.pair.elixir }}-plts-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}

- name: Create PLTs
if: steps.plt-cache.outputs.cache-hit != 'true'
Expand Down

0 comments on commit ccbab7b

Please sign in to comment.