Skip to content

Commit

Permalink
Add Elixir 1.18 to the CI workflow (#607)
Browse files Browse the repository at this point in the history
* Add Elixir 1.18 to the CI workflow

* Use available OTP version
  • Loading branch information
philss authored Dec 27, 2024
1 parent 2c68b0f commit 069cb40
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,33 @@ on:

jobs:
test:
runs-on: ubuntu-20.04
name: Elixir ${{ matrix.elixir }} / OTP ${{ matrix.otp }} with ${{ matrix.parser }}
runs-on: ubuntu-22.04
name: Elixir ${{ matrix.elixir }} / OTP ${{ matrix.otp }} / ${{ matrix.parser }}

strategy:
fail-fast: false
matrix:
elixir: ["1.17", "1.14"]
otp: ["27.1", "23.3"]
elixir: ["1.18", "1.14"]
otp: ["27.2", "24.2"]
parser: [fast_html, html5ever, mochiweb]
exclude:
- elixir: "1.17"
otp: "23.3"
- elixir: "1.18"
otp: "24.2"

- elixir: "1.14"
otp: "27.1"
otp: "27.2"

steps:
- uses: actions/checkout@v4

- uses: erlef/setup-beam@v1
with:
otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.elixir}}
otp-version: ${{ matrix.otp }}
elixir-version: ${{ matrix.elixir }}

- name: Check format
run: mix format --check-formatted
if: matrix.elixir == '1.17'
if: matrix.elixir == '1.18'

- name: Install dependencies
run: mix deps.get
Expand Down
5 changes: 4 additions & 1 deletion lib/floki/html/tokenizer.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2673,7 +2673,10 @@ defmodule Floki.HTML.Tokenizer do
character_reference_end(html, %{state | buffer: buffer})
end

defp character_buffer(%State{charref_state: %CharrefState{candidate: candidate}, buffer: buffer}) do
defp character_buffer(%State{
charref_state: %CharrefState{candidate: candidate},
buffer: buffer
}) do
if candidate do
Floki.Entities.Codepoints.get(candidate)
else
Expand Down
4 changes: 3 additions & 1 deletion lib/floki/html_parser/fast_html.ex
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ defmodule Floki.HTMLParser.FastHtml do

@impl true
def parse_fragment(html, args) do
execute_with_module(fn module -> module.decode_fragment(IO.chardata_to_string(html), args) end)
execute_with_module(fn module ->
module.decode_fragment(IO.chardata_to_string(html), args)
end)
end

@impl true
Expand Down

0 comments on commit 069cb40

Please sign in to comment.