Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI housekeeping #52

Merged
merged 1 commit into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 7 additions & 12 deletions .github/workflows/erlang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,17 @@ on:
- master
jobs:
ci:
name: Run checks and tests over ${{matrix.otp_vsn}} and ${{matrix.os}}
runs-on: ${{matrix.os}}
name: OTP ${{matrix.otp}}
runs-on: ubuntu-latest
# enable this to test all OTP versions at once regardless the errors
# continue-on-error: true
container:
image: erlang:${{matrix.otp_vsn}}
image: erlang:${{matrix.otp}}
strategy:
matrix:
otp_vsn: ["19.0", "19.3",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OTP 19 not in the official supported Docker image tags.
See https://hub.docker.com/_/erlang/

"20.0", "20.1.7", "20.3.8.22",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OTP 20:

Run rebar3 eunit
===> Analyzing applications...
===> Compiling verl
===> Compiling hex_core
===> Compiling _build/default/plugins/hex_core/src/hex_pb_signed.erl failed
_build/default/plugins/hex_core/src/hex_pb_signed.erl:[6](https://github.com/kianmeng/erlang-certifi/actions/runs/9628138976/job/26556041390#step:5:7)6: not yet implemented 'if'
_build/default/plugins/hex_core/src/hex_pb_signed.erl:[7](https://github.com/kianmeng/erlang-certifi/actions/runs/9628138976/job/26556041390#step:5:8)2: not yet implemented 'if'

===> Errors loading plugin rebar3_hex. Run rebar3 with DEBUG=1 set to see errors.
===> Errors loading plugin rebar3_ex_doc. Run rebar3 with DEBUG=1 set to see errors.
===> Verifying dependencies...
===> Analyzing applications...
===> Compiling certifi
===> Compiling _build/default/plugins/hex_core/src/hex_pb_names.erl failed
_build/default/plugins/hex_core/src/hex_pb_names.erl:76: not yet implemented 'if'
_build/default/plugins/hex_core/src/hex_pb_names.erl:[8](https://github.com/kianmeng/erlang-certifi/actions/runs/9628138976/job/26556041390#step:5:9)2: not yet implemented 'if'

"21.0.9", "21.1.4", "21.2.7", "21.3.8.1",
"22.0.7", "22.2.8", "22.3.4",
"23.0.2", "23.2", "24"]
os: [ubuntu-latest]
otp: [21, 22, 23, 24, 25, 26, 27]
steps:
- run: |
apt-get update
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- run: rebar3 --version
- run: rebar3 eunit
- run: rebar3 dialyzer
18 changes: 0 additions & 18 deletions .travis.yml

This file was deleted.

7 changes: 6 additions & 1 deletion rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,9 @@
{source_url, "https://github.com/certifi/erlang-certifi"},
{assets, "assets"},
{api_reference, true}
]}.
]}.

%% Since OTP 26
{dialyzer, [
{plt_extra_apps, [public_key]}
]}.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Run rebar3 dialyzer
===> Verifying dependencies...
===> Analyzing applications...
===> Compiling certifi
===> Dialyzer starting, this may take a while...
===> Add debug_info to compiler options (erl_opts) if Dialyzer fails to load Core Erlang.
===> Updating plt...
===> Resolving project files...
===> Updating base plt...
===> Resolving base files...
===> Building with 212 files in /home/runner/.cache/rebar3/rebar3_2[6](https://github.com/kianmeng/erlang-certifi/actions/runs/9627560355/job/26554777720#step:6:7).2.5_plt...
===> Copying /home/runner/.cache/rebar3/rebar3_26.2.5_plt to /home/runner/work/erlang-certifi/erlang-certifi/_build/default/rebar3_26.2.5_plt...
===> Checking 212 files in _build/default/rebar3_26.2.5_plt...
===> Doing success typing analysis...
===> Resolving project warning files...
===> Analyzing 2 files with _build/default/rebar3_26.2.5_plt...

./certifi_pt.erl
Line [9](https://github.com/kianmeng/erlang-certifi/actions/runs/9627560355/job/26554777720#step:6:10) Column 10: Unknown function public_key:pem_decode/1
===> Warnings written to _build/default/26.2.5.dialyzer_warnings
===> Warnings occurred running dialyzer: 1
Error: Process completed with exit code 1.

8 changes: 4 additions & 4 deletions test/certifi_tests.erl
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ reproducible_module_test() ->

cacerts_test_() ->
Certs = [Cert1, Cert2, Cert3 | _] = certifi:cacerts(),
[?_assertEqual(128, length(Certs))
,?_assertMatch(<<48,130,5,192,48,130,3,168,160,3,2,1,2,2,16,30,191,89,80,184,_/binary>>, Cert1)
,?_assertMatch(<<48,130,2,101,48,130,1,235,160,3,2,1,2,2,16,120,143,39,92,_/binary>>, Cert2)
,?_assertMatch(<<48,130,5,239,48,130,3,215,160,3,2,1,2,2,8,13,211,227,188,_/binary>>, Cert3)
[?_assertEqual(147, length(Certs))
,?_assertMatch(<<48,130,5,179,48,130,3,155,160,3,2,1,2,2,16,33,156,84,45,232,_/binary>>, Cert1)
,?_assertMatch(<<48,130,2,66,48,130,1,201,160,3,2,1,2,2,16,54,58,150,140,_/binary>>, Cert2)
,?_assertMatch(<<48,130,5,108,48,130,3,84,160,3,2,1,2,2,20,84,22,191,59,_/binary>>, Cert3)
,?_assertMatch(<<48,130,3,117,48,130,2,93,160,3,2,1,2,2,11,4,0,0,0,0,1,21,75,90,195,148,48,13,6,_/binary>>, lists:last(Certs))
].