From 696a96f46207f9c81c5960cf4ea5baed79deecaf Mon Sep 17 00:00:00 2001 From: Wojtek Mach Date: Tue, 23 Mar 2021 13:39:00 +0100 Subject: [PATCH 1/3] Update CI config --- .github/workflows/ci.yml | 47 ++++++++++++++++++++++++++++++++++++++++ .travis.yml | 25 --------------------- README.md | 5 ++++- 3 files changed, 51 insertions(+), 26 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..4fb4d98 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,47 @@ +name: CI + +on: + pull_request: + push: + branches: + - master + +jobs: + test: + runs-on: ubuntu-16.04 + env: + MIX_ENV: test + strategy: + fail-fast: false + matrix: + include: + - pair: + elixir: 1.4.5 + otp: 19.3.6.13 + - pair: + elixir: 1.11.4 + otp: 23.2.7 + lint: lint + steps: + - uses: actions/checkout@v2 + + - uses: erlef/setup-elixir@v1 + with: + otp-version: ${{matrix.pair.otp}} + elixir-version: ${{matrix.pair.elixir}} + + - 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 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 7c366ef..0000000 --- a/.travis.yml +++ /dev/null @@ -1,25 +0,0 @@ -sudo: false -language: elixir - -elixir: '1.10' -otp_release: '22.0' - -stages: - - check formatted - - test - -jobs: - include: - - stage: check formatted - script: mix format --check-formatted - - - stage: test - - - elixir: 1.4 - otp_release: 19.3 - - elixir: 1.9 - otp_release: 20.3 - - elixir: 1.9 - otp_release: 21.3 - - elixir: 1.10 - otp_release: 22.0 diff --git a/README.md b/README.md index 3355c77..e213b97 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # MakeupC -A [Makeup](https://github.com/tmbb/makeup/) lexer for the C language. + +[![Build Status](https://github.com/elixir-makeup/makeup_c/workflows/CI/badge.svg)](https://github.com/elixir-makeup/makeup_c/actions) + +A [Makeup](https://github.com/elixir-makeup/makeup/) lexer for the C language. ## Installation From c6662988285236721063cdf394d6e06471e40538 Mon Sep 17 00:00:00 2001 From: Wojtek Mach Date: Tue, 23 Mar 2021 14:29:00 +0100 Subject: [PATCH 2/3] Require Elixir 1.6 Recent NimbleParsec versions require that. --- .github/workflows/ci.yml | 2 +- mix.exs | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4fb4d98..583756d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: matrix: include: - pair: - elixir: 1.4.5 + elixir: 1.6.6 otp: 19.3.6.13 - pair: elixir: 1.11.4 diff --git a/mix.exs b/mix.exs index dffd464..c0a828c 100644 --- a/mix.exs +++ b/mix.exs @@ -8,7 +8,7 @@ defmodule MakeupC.MixProject do [ app: :makeup_c, version: @version, - elixir: "~> 1.4", + elixir: "~> 1.6", start_permanent: Mix.env() == :prod, deps: deps(), # Package @@ -46,7 +46,7 @@ defmodule MakeupC.MixProject do defp deps do [ {:makeup, "~> 1.0"}, - {:ex_doc, ">= 0.0.0", only: [:dev, :docs]}, + {:ex_doc, ">= 0.0.0", only: [:dev, :docs]} ] end @@ -57,5 +57,4 @@ defmodule MakeupC.MixProject do main: "Makeup.Lexers.CLexer" ] end - end From 0f4007daa1180486b33f9099fde0235a92a0013b Mon Sep 17 00:00:00 2001 From: Wojtek Mach Date: Tue, 25 May 2021 14:18:36 +0200 Subject: [PATCH 3/3] Update --- .github/workflows/ci.yml | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 583756d..3c966e2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ on: jobs: test: - runs-on: ubuntu-16.04 + runs-on: ubuntu-18.04 env: MIX_ENV: test strategy: @@ -16,11 +16,11 @@ jobs: matrix: include: - pair: - elixir: 1.6.6 - otp: 19.3.6.13 + elixir: 1.6 + otp: 19 - pair: - elixir: 1.11.4 - otp: 23.2.7 + elixir: 1.12 + otp: 24 lint: lint steps: - uses: actions/checkout@v2 @@ -30,13 +30,21 @@ jobs: otp-version: ${{matrix.pair.otp}} elixir-version: ${{matrix.pair.elixir}} - - name: Install Dependencies - run: mix deps.get --only test + - uses: actions/cache@v2 + with: + path: | + deps + _build + key: ${{ runner.os }}-mix-${{matrix.pair.elixir}}-${{matrix.pair.otp}}-${{ hashFiles('**/mix.lock') }} + restore-keys: | + ${{ runner.os }}-mix- + + - run: mix deps.get - run: mix format --check-formatted if: ${{ matrix.lint }} - - run: mix deps.get && mix deps.unlock --check-unused + - run: mix deps.unlock --check-unused if: ${{ matrix.lint }} - run: mix deps.compile