Skip to content

Commit

Permalink
Switch to github workflows (elixir-editors#420)
Browse files Browse the repository at this point in the history
* Switch to github workflows

Travis open source version is going away at the end of the year. Also
the wait times are an hour+

* Update versions of elixir/erlang tested
  • Loading branch information
axelson authored Nov 28, 2020
1 parent 083ea3b commit bdf225b
Show file tree
Hide file tree
Showing 2 changed files with 89 additions and 49 deletions.
89 changes: 89 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: CI

on:
pull_request:
branches:
- master
push:
branches:
- master

jobs:
mix_test:
name: mix test (Elixir ${{matrix.elixir}} | Erlang/OTP ${{matrix.otp}})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- elixir: 1.8.x
otp: 21.3.8.18
tests_may_fail: false
- elixir: 1.9.x
otp: 21.3.8.18
tests_may_fail: false
- elixir: 1.10.x
otp: 21.3.8.18
tests_may_fail: false
check_unused_deps: true
- elixir: 1.11.x
otp: 21.3.8.18
tests_may_fail: false
check_unused_deps: true
- elixir: 1.11.x
otp: 23.1.4
tests_may_fail: false
warnings_as_errors: true
check_formatted: true
check_unused_deps: true
run_dialyzer: true
env:
MIX_ENV: test
steps:
- uses: actions/checkout@v2
- uses: actions/setup-elixir@v1
with:
otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.elixir}}
- name: Install Dependencies
run: |
mix local.hex --force
mix local.rebar --force
mix deps.get --only test
- run: mix format --check-formatted
if: matrix.check_formatted
- run: mix compile --warnings-as-errors
if: matrix.warnings_as_errors
- run: mix test || ${{ matrix.tests_may_fail }}

static_analysis:
name: static analysis (Elixir ${{matrix.elixir}} | Erlang/OTP ${{matrix.otp}})
runs-on: ubuntu-latest
strategy:
matrix:
include:
- elixir: 1.11.0
otp: 23.1.1
steps:
- uses: actions/checkout@v2
- uses: actions/setup-elixir@v1
with:
otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.elixir}}
- name: Cache build artifacts
uses: actions/cache@v2
with:
path: |
~/.hex
~/.mix
_build
key: ${{ matrix.otp }}-${{ matrix.elixir }}-static_analysis-build
- name: Install Dependencies
run: |
mix local.hex --force
mix local.rebar --force
mix deps.get
- name: Restore timestamps to prevent unnecessary recompilation
run: IFS=$'\n'; for f in $(git ls-files); do touch -d "$(git log -n 1 --pretty='%cI' -- $f)" "$f"; done
- run: mix dialyzer
if: matrix.run_dialyzer
49 changes: 0 additions & 49 deletions .travis.yml

This file was deleted.

0 comments on commit bdf225b

Please sign in to comment.