diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..c985db9 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,50 @@ +name: CI + +on: + push: + branches: + - master + pull_request: + +jobs: + lint: + name: Code linting + uses: lexmag/elixir-actions/.github/workflows/lint.yml@v2 + with: + otp-version: "24" + elixir-version: "1.14" + + test: + name: Test suite + runs-on: ubuntu-20.04 + + strategy: + matrix: + otp: ["24"] + elixir: ["1.14"] + runtime_config: [true, false] + + include: + - otp: "20" + elixir: "1.6" + runtime_config: false + + env: + MIX_ENV: test + + steps: + - uses: actions/checkout@v3 + + - name: Set up Elixir environment + uses: erlef/setup-beam@v1 + with: + elixir-version: ${{ matrix.elixir }} + otp-version: ${{ matrix.otp }} + + - name: Install dependencies + run: mix deps.get --only test + + - name: Run tests + run: mix test + env: + STATIX_TEST_RUNTIME_CONFIG: ${{ matrix.runtime_config }} \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 5fdc741..0000000 --- a/.travis.yml +++ /dev/null @@ -1,28 +0,0 @@ -language: elixir - -branches: - only: - - master - -jobs: - include: - - stage: check formatted - script: mix format --check-formatted - otp_release: 20.3 - elixir: 1.7 - - stage: test - script: mix test - otp_release: 18.3 - elixir: 1.3 - - otp_release: 19.3 - elixir: 1.4 - - otp_release: 20.3 - elixir: 1.5 - - otp_release: 20.3 - elixir: 1.6 - env: STATIX_TEST_RUNTIME_CONFIG=false - - otp_release: 20.3 - elixir: 1.6 - env: STATIX_TEST_RUNTIME_CONFIG=true - - otp_release: 21.0 - elixir: 1.7 diff --git a/README.md b/README.md index fbdf345..5d551c6 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Statix -[![Build Status](https://travis-ci.com/lexmag/statix.svg?branch=master)](https://travis-ci.com/lexmag/statix) +[![CI Status](https://github.com/lexmag/statix/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/lexmag/statix/actions/workflows/ci.yml) [![Hex Version](https://img.shields.io/hexpm/v/statix.svg "Hex Version")](https://hex.pm/packages/statix) Statix is an Elixir client for StatsD-compatible servers.