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

Dependency upgrades, CI upgrades, fixed tests #2

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from
Draft
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
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: 'CI Tests'

on:
push:
branches:
- 'master'
- '1.x'
- 'upgrades'

jobs:
test:
runs-on: ubuntu-latest
name: Erlang/OTP ${{matrix.otp}} / rebar3 ${{matrix.rebar3}}
strategy:
matrix:
otp:
- '22.*'
- '23.*'
- '24.*'
rebar3:
- '3.18.0'
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-beam@v1
with:
otp-version: ${{matrix.otp}}
rebar3-version: ${{matrix.rebar3}}
- run: rebar3 eunit
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ priv/*
test/ct/logs/*
test/ct/config/*.config
.rebar
_build
18 changes: 0 additions & 18 deletions .travis.yml

This file was deleted.

9 changes: 9 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
2.0.0
------
- Migrated from rebar 2 to rebar3
- Migrated from Travis-CI to GitHub Workflow
- Testing OTP releases 22-24

Breaking Changes:
- Removed protofy_pulse module

1.5.1
------
- Compatibility fixes for R16B03+
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) Protofy GmbH & Co. KG, Kaiser-Wilhelm-Straße 85, 20355 Hamburg/Germany and individual contributors.
Copyright (c) Protofy GmbH & Co. KG, Herrengraben 30, 20459 Hamburg/Germany and individual contributors.
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
Expand Down
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
REBAR=`which rebar || echo ./rebar`
REBAR=`which rebar3`
all: compile docs
update: get-deps update-deps
full: clean get-deps update-deps compile docs tests
Expand All @@ -8,16 +8,16 @@ prod: get-deps update-deps compile-prod test docs
get-deps:
@$(REBAR) get-deps
update-deps:
@$(REBAR) update-deps
@$(REBAR) upgrade --all
compile:
@$(REBAR) compile
compile-prod:
@$(REBAR) compile
tests:
@$(REBAR) skip_deps=true eunit ct
@$(REBAR) eunit ct
clean:
@$(REBAR) skip_deps=true clean
clean-all:
@$(REBAR) clean
clean-all:
@$(REBAR) clean -a
docs:
@$(REBAR) skip_deps=true doc
@$(REBAR) edoc
2 changes: 1 addition & 1 deletion include/common_types.hrl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
%% ====================================================================
%%
%% Copyright (c) Protofy GmbH & Co. KG, Kaiser-Wilhelm-Straße 85, 20355 Hamburg/Germany and individual contributors.
%% Copyright (c) Protofy GmbH & Co. KG, Herrengraben 30, 20459 Hamburg/Germany and individual contributors.
%% All rights reserved.
%%
%% Redistribution and use in source and binary forms, with or without modification,
Expand Down
2 changes: 1 addition & 1 deletion include/protofy_common.hrl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
%% ====================================================================
%%
%% Copyright (c) Protofy GmbH & Co. KG, Kaiser-Wilhelm-Straße 85, 20355 Hamburg/Germany and individual contributors.
%% Copyright (c) Protofy GmbH & Co. KG, Herrengraben 30, 20459 Hamburg/Germany and individual contributors.
%% All rights reserved.
%%
%% Redistribution and use in source and binary forms, with or without modification,
Expand Down
2 changes: 1 addition & 1 deletion include/protofy_macros.hrl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
%% ====================================================================
%%
%% Copyright (c) Protofy GmbH & Co. KG, Kaiser-Wilhelm-Straße 85, 20355 Hamburg/Germany and individual contributors.
%% Copyright (c) Protofy GmbH & Co. KG, Herrengraben 30, 20459 Hamburg/Germany and individual contributors.
%% All rights reserved.
%%
%% Redistribution and use in source and binary forms, with or without modification,
Expand Down
2 changes: 1 addition & 1 deletion include/protofy_types.hrl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
%% ====================================================================
%%
%% Copyright (c) Protofy GmbH & Co. KG, Kaiser-Wilhelm-Straße 85, 20355 Hamburg/Germany and individual contributors.
%% Copyright (c) Protofy GmbH & Co. KG, Herrengraben 30, 20459 Hamburg/Germany and individual contributors.
%% All rights reserved.
%%
%% Redistribution and use in source and binary forms, with or without modification,
Expand Down
17 changes: 6 additions & 11 deletions rebar.config
Original file line number Diff line number Diff line change
@@ -1,32 +1,27 @@
{erl_opts, [
fail_on_warning,
warnings_as_errors,
bin_opt_info
]}.

{clean_files, [
"erl_crash.dump",
"*.eunit", "ebin/*", ".eunit/",
"doc/*.html", "doc/*.edoc-info", "doc/*.css", "doc/*.png", "doc/edoc-info",
"test/ct/logs/*", "test/ct/*.beam", "test/ct/helpers/*.beam",
"deps/*"
"test/ct/logs/*", "test/ct/*.beam", "test/ct/helpers/*.beam"
]}.

{deps, [
{uuid, ".*", {git, "git://github.com/avtobiff/erlang-uuid.git", {tag, "v0.4.7"}}},
{dh_date, ".*", {git, "https://github.com/daleharvey/dh_date.git"}},
{meck, ".*", {git, "https://github.com/eproxus/meck.git", {branch, "master"}}}
{dh_date, "1.0.0"},
{meck, "0.9.2"}
]}.

{deps_dir, "deps"}.


{cover_enabled, true}.

{eunit_opts, [
% verbose,
{report, {
eunit_surefire,
[{dir, "."}]
[{dir, "./logs/eunit"}]
}}
]}.

Expand All @@ -36,6 +31,6 @@


{ct_dir, "test/ct"}.
{ct_log_dir, "test/ct/logs"}.
{ct_log_dir, "logs/ct"}.
{ct_extra_params, "-args_file test/ct/config/node.args -pa test/ct"}.
{ct_use_short_names, true}.
11 changes: 11 additions & 0 deletions rebar.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{"1.2.0",
[{<<"dh_date">>,{pkg,<<"dh_date">>,<<"1.0.0">>},0},
{<<"meck">>,{pkg,<<"meck">>,<<"0.9.2">>},0}]}.
[
{pkg_hash,[
{<<"dh_date">>, <<"5B0C286665E160DE44132552931BEF06B5CB2244D5BD20E333A686E9D8BF92E3">>},
{<<"meck">>, <<"85CCBAB053F1DB86C7CA240E9FC718170EE5BDA03810A6292B5306BF31BAE5F5">>}]},
{pkg_hash_ext,[
{<<"dh_date">>, <<"3F5D908383A0243A693147EA85A5654769B90078AC999A076ED6F0917F7614CF">>},
{<<"meck">>, <<"81344F561357DC40A8344AFA53767C32669153355B626EA9FCBC8DA6B3045826">>}]}
].
2 changes: 1 addition & 1 deletion src/protofy_common.app.src
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{application, protofy_common,
[{description, "Protofy common library"},
{vsn, "1.5.0"},
{vsn, "2.0.0"},
{registered, []},
{applications, [kernel, stdlib]},
{env, []}
Expand Down
2 changes: 1 addition & 1 deletion src/protofy_inet.erl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
%% ====================================================================
%%
%% Copyright (c) Protofy GmbH & Co. KG, Kaiser-Wilhelm-Straße 85, 20355 Hamburg/Germany and individual contributors.
%% Copyright (c) Protofy GmbH & Co. KG, Herrengraben 30, 20459 Hamburg/Germany and individual contributors.
%% All rights reserved.
%%
%% Redistribution and use in source and binary forms, with or without modification,
Expand Down
2 changes: 1 addition & 1 deletion src/protofy_node.erl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
%% ====================================================================
%%
%% Copyright (c) Protofy GmbH & Co. KG, Kaiser-Wilhelm-Straße 85, 20355 Hamburg/Germany and individual contributors.
%% Copyright (c) Protofy GmbH & Co. KG, Herrengraben 30, 20459 Hamburg/Germany and individual contributors.
%% All rights reserved.
%%
%% Redistribution and use in source and binary forms, with or without modification,
Expand Down
73 changes: 0 additions & 73 deletions src/protofy_pulse.erl

This file was deleted.

2 changes: 1 addition & 1 deletion src/protofy_test_util.erl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
%% ====================================================================
%%
%% Copyright (c) Protofy GmbH & Co. KG, Kaiser-Wilhelm-Straße 85, 20355 Hamburg/Germany and individual contributors.
%% Copyright (c) Protofy GmbH & Co. KG, Herrengraben 30, 20459 Hamburg/Germany and individual contributors.
%% All rights reserved.
%%
%% Redistribution and use in source and binary forms, with or without modification,
Expand Down
2 changes: 1 addition & 1 deletion src/protofy_time.erl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
%% ====================================================================
%%
%% Copyright (c) Protofy GmbH & Co. KG, Kaiser-Wilhelm-Straße 85, 20355 Hamburg/Germany and individual contributors.
%% Copyright (c) Protofy GmbH & Co. KG, Herrengraben 30, 20459 Hamburg/Germany and individual contributors.
%% All rights reserved.
%%
%% Redistribution and use in source and binary forms, with or without modification,
Expand Down
4 changes: 2 additions & 2 deletions src/protofy_util.erl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
%% ====================================================================
%%
%% Copyright (c) Protofy GmbH & Co. KG, Kaiser-Wilhelm-Straße 85, 20355 Hamburg/Germany and individual contributors.
%% Copyright (c) Protofy GmbH & Co. KG, Herrengraben 30, 20459 Hamburg/Germany and individual contributors.
%% All rights reserved.
%%
%% Redistribution and use in source and binary forms, with or without modification,
Expand Down Expand Up @@ -49,4 +49,4 @@
-spec shuffle(list()) -> list().
%% ====================================================================
shuffle(List) when is_list(List) ->
[Elem || {_, Elem} <- lists:keysort(1, [{random:uniform(), E} || E <- List])].
[Elem || {_, Elem} <- lists:keysort(1, [{rand:uniform(), E} || E <- List])].
2 changes: 1 addition & 1 deletion test/protofy_common_hrl_tests.erl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
%% ====================================================================
%%
%% Copyright (c) Protofy GmbH & Co. KG, Kaiser-Wilhelm-Straße 85, 20355 Hamburg/Germany and individual contributors.
%% Copyright (c) Protofy GmbH & Co. KG, Herrengraben 30, 20459 Hamburg/Germany and individual contributors.
%% All rights reserved.
%%
%% Redistribution and use in source and binary forms, with or without modification,
Expand Down
2 changes: 1 addition & 1 deletion test/protofy_inet_tests.erl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
%% ====================================================================
%%
%% Copyright (c) Protofy GmbH & Co. KG, Kaiser-Wilhelm-Straße 85, 20355 Hamburg/Germany and individual contributors.
%% Copyright (c) Protofy GmbH & Co. KG, Herrengraben 30, 20459 Hamburg/Germany and individual contributors.
%% All rights reserved.
%%
%% Redistribution and use in source and binary forms, with or without modification,
Expand Down
2 changes: 1 addition & 1 deletion test/protofy_macro_gen_server_tests.erl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
%% ====================================================================
%%
%% Copyright (c) Protofy GmbH & Co. KG, Kaiser-Wilhelm-Straße 85, 20355 Hamburg/Germany and individual contributors.
%% Copyright (c) Protofy GmbH & Co. KG, Herrengraben 30, 20459 Hamburg/Germany and individual contributors.
%% All rights reserved.
%%
%% Redistribution and use in source and binary forms, with or without modification,
Expand Down
15 changes: 9 additions & 6 deletions test/protofy_node_tests.erl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
%% ====================================================================
%%
%% Copyright (c) Protofy GmbH & Co. KG, Kaiser-Wilhelm-Straße 85, 20355 Hamburg/Germany and individual contributors.
%% Copyright (c) Protofy GmbH & Co. KG, Herrengraben 30, 20459 Hamburg/Germany and individual contributors.
%% All rights reserved.
%%
%% Redistribution and use in source and binary forms, with or without modification,
Expand Down Expand Up @@ -130,11 +130,14 @@ configure_undefined() ->
%% Internal functions
%% ====================================================================
start_node() ->
net_kernel:start(
[erlang:list_to_atom(
"protofy_node_tests_" ++ erlang:integer_to_list(
crypto:rand_uniform(1000000, 9999999))),
shortnames]),
_ = os:cmd("epmd -daemon"),
Name = erlang:list_to_atom(
"protofy_node_tests_" ++ erlang:integer_to_list(
1000000 + rand:uniform(8999999))),
Options = #{
name_domain => shortnames
},
net_kernel:start(Name, Options),
ok.


Expand Down
Loading