diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index c2b8378..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,40 +0,0 @@ -version: 2 -jobs: - build: - parallelism: 1 - docker: - - image: circleci/elixir:1.8.0 - environment: - MIX_ENV: test - working_directory: ~/app - steps: - - checkout - - run: mix local.hex --force - - run: mix local.rebar --force - - restore_cache: - keys: - - v1-mix-cache-{{ .Branch }}-{{ checksum "mix.lock" }} - - v1-mix-cache-{{ .Branch }} - - v1-mix-cache - - restore_cache: - keys: - - v1-build-cache-{{ .Branch }} - - v1-build-cache - - run: mix do deps.get, compile - - save_cache: - key: v1-mix-cache-{{ .Branch }}-{{ checksum "mix.lock" }} - paths: "deps" - - save_cache: - key: v1-mix-cache-{{ .Branch }} - paths: "deps" - - save_cache: - key: v1-mix-cache - paths: "deps" - - save_cache: - key: v1-build-cache-{{ .Branch }} - paths: "_build" - - save_cache: - key: v1-build-cache - paths: "_build" - - run: mix format --check-formatted - - run: mix test diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..a70bb56 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,43 @@ +name: Build and Test + +on: + push: + branches: + - '*' + +jobs: + build_linux: + name: Build and test on Linux + runs-on: ubuntu-latest + strategy: + matrix: + otp: ['25.3', '26.2', '27.0'] + elixir: ['1.15.7', '1.16.3', '1.17.1'] + exclude: + - otp: '27.0' + elixir: '1.15.7' + - otp: '27.0' + elixir: '1.16.3' + env: + MIX_ENV: test + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup beam + uses: erlef/setup-beam@v1 + with: + otp-version: ${{matrix.otp}} + elixir-version: ${{matrix.elixir}} + install-hex: true + install-rebar: true + + - name: Setup Elixir Project + run: mix deps.get + + - name: Check format + run: mix format --check-formatted + + - name: Run Tests + run: mix test --warnings-as-errors diff --git a/README.md b/README.md index 6f93b57..1b2c8fd 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ > A dead simple vtt parser in Elixir. -[![CircleCI](https://circleci.com/gh/grain-team/vttyl.svg?style=svg)](https://circleci.com/gh/grain-team/vttyl) [![Hex version badge](https://img.shields.io/hexpm/v/vttyl.svg)](https://hex.pm/packages/vttyl) +[![Hex version badge](https://img.shields.io/hexpm/v/vttyl.svg)](https://hex.pm/packages/vttyl) ## Installation