diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..1c09925 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,39 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + build: + name: Build and test + runs-on: ubuntu-latest + + strategy: + matrix: + include: + - elixir: "1.19" + otp: "28" + - elixir: "1.18.2" + otp: "27.2" + - elixir: "1.18" + otp: "27" + + steps: + - uses: actions/checkout@v6 + - uses: erlef/setup-beam@v1.23 + with: + otp-version: ${{matrix.otp}} + elixir-version: ${{matrix.elixir}} + + - name: Restore dependencies cache + uses: actions/cache@v5 + with: + path: deps + key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }} + restore-keys: ${{ runner.os }}-mix- + + - run: mix deps.get + - run: mix test diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 092aa74..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: CI - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - build: - name: Build and test - runs-on: ubuntu-latest - - strategy: - matrix: - include: - - elixir: '1.10' - otp: '22.0' - - elixir: '1.11' - otp: '23.0' - - elixir: '1.12' - otp: '23.0' - - steps: - - uses: actions/checkout@v2 - - name: Set up Elixir - uses: erlef/setup-beam@v1 - with: - otp-version: ${{matrix.otp}} - elixir-version: ${{matrix.elixir}} - - - name: Restore dependencies cache - uses: actions/cache@v2 - with: - path: deps - key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }} - restore-keys: ${{ runner.os }}-mix- - - - run: mix deps.get - - run: mix test diff --git a/README.md b/README.md index 0f7d16a..f8a3629 100644 --- a/README.md +++ b/README.md @@ -219,12 +219,12 @@ base |> Delta.compose(change) |> Delta.compose(inverted) == base
-[badge-github]: https://github.com/slab/delta-elixir/actions/workflows/ci.yml/badge.svg +[badge-github]: https://github.com/slab/delta-elixir/actions/workflows/ci.yaml/badge.svg [badge-version]: https://img.shields.io/hexpm/v/delta.svg [badge-license]: https://img.shields.io/hexpm/l/delta.svg [badge-downloads]: https://img.shields.io/hexpm/dt/delta.svg [hexpm]: https://hex.pm/packages/delta -[github-build]: https://github.com/slab/delta-elixir/actions/workflows/ci.yml +[github-build]: https://github.com/slab/delta-elixir/actions/workflows/ci.yaml [github-license]: https://github.com/slab/delta-elixir/blob/master/LICENSE [github-fork]: https://github.com/slab/delta-elixir/fork [docs]: https://hexdocs.pm/delta