Skip to content

Commit 6222ec0

Browse files
committed
Rearrange so it's a little easier to do property based testing.
1 parent 0ae7960 commit 6222ec0

26 files changed

+6090
-2
lines changed

.github/workflows/ci.yml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
env:
6+
CC: clang
7+
CXX: clang++
8+
MIX_ENV: test
9+
WARNINGS_AS_ERRORS: true
10+
11+
jobs:
12+
test:
13+
name: Test
14+
runs-on: ubuntu-latest
15+
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
include:
20+
- elixir: 1.18.4
21+
otp: 28.0.2
22+
rebar3: 3.25.1
23+
lint: true
24+
25+
- elixir: 1.18.4
26+
otp: 27.3
27+
rebar3: 3.25.1
28+
29+
steps:
30+
- uses: actions/checkout@v5
31+
32+
- name: Setup Beam
33+
uses: erlef/setup-beam@v1
34+
with:
35+
elixir-version: ${{ matrix.elixir }}
36+
otp-version: ${{ matrix.otp }}
37+
rebar3-version: ${{ matrix.rebar3 }}
38+
39+
# - name: (Erlang) Check Formatting
40+
# if: ${{ matrix.lint }}
41+
# run: |
42+
# clang-format --version
43+
# make lint-format
44+
45+
# - name: (Erlang) eqWAlizer
46+
# if: ${{ matrix.lint }}
47+
# run: make lint-eqwalizer
48+
49+
# - name: (Erlang) Dialyzer
50+
# if: ${{ matrix.lint }}
51+
# run: make lint-dialyzer
52+
53+
# - name: (Erlang) Xref
54+
# if: ${{ matrix.lint }}
55+
# run: make lint-xref
56+
57+
- name: (Erlang) Tests
58+
run: |
59+
rebar3 ct
60+
61+
# - name: (Elixir) Retrieve Mix Dependencies Cache
62+
# uses: actions/cache@v4
63+
# id: mix-cache
64+
# with:
65+
# path: deps
66+
# key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
67+
68+
# - name: (Elixir) Install Mix Dependencies
69+
# if: steps.mix-cache.outputs.cache-hit != 'true'
70+
# run: |
71+
# mix local.rebar --force
72+
# mix local.hex --force
73+
# mix deps.get
74+
75+
# - name: (Elixir) Check Formatting
76+
# if: ${{ matrix.lint }}
77+
# run: mix format --check-formatted
78+
79+
# - name: (Elixir) Tests
80+
# run: mix test --trace
81+
82+
- name: Logs
83+
uses: actions/upload-artifact@v4
84+
if: failure()
85+
with:
86+
name: ct-logs-${{ matrix.otp }}-${{ matrix.elixir }}
87+
path: _build/test/logs/

.gitignore

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# The directory Mix will write compiled artifacts to.
2+
/_build/
3+
/apps/merge_raft/_build/
4+
/apps/merge_raft_test/_build/
5+
6+
# If you run "mix test --cover", coverage assets end up here.
7+
/cover/
8+
9+
# The directory Mix downloads your dependencies sources to.
10+
/deps/
11+
/apps/merge_raft/deps/
12+
/apps/merge_raft_test/deps/
13+
14+
# Where third-party dependencies like ExDoc output generated docs.
15+
/doc/
16+
/apps/merge_raft/doc/
17+
/apps/merge_raft_test/doc/
18+
19+
# Ignore .fetch files in case you like to edit your project deps locally.
20+
/.fetch
21+
22+
# If the VM crashes, it generates a dump, let's ignore it too.
23+
erl_crash.dump
24+
25+
# Also ignore archive artifacts (built via "mix archive.build").
26+
*.ez
27+
28+
# Ignore package tarball (built via "mix hex.build").
29+
merge_raft-*.tar
30+
merge_raft_test-*.tar
31+
32+
# Temporary files, for example, from tests.
33+
/tmp/
34+
35+
# rebar3 and erlang.mk related files.
36+
.rebar3
37+
_*
38+
.eunit
39+
*.o
40+
*.beam
41+
*.plt
42+
*.swp
43+
*.swo
44+
.DS_Store
45+
.erlang.cookie
46+
ebin
47+
log
48+
erl_crash.dump
49+
.rebar
50+
logs
51+
_build
52+
.idea
53+
.vscode
54+
*.iml
55+
rebar3.crashdump
56+
*~
57+
/.elixir_ls/
58+
/.erlang.mk/
59+
/apps/merge_raft/c_src/env.mk
60+
/apps/merge_raft/priv/*.dll
61+
/apps/merge_raft/priv/*.dylib
62+
/apps/merge_raft/priv/*.so
63+
/elp
64+
/erlfmt
65+
/rebar3

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Changelog
2+
3+
## 0.0.1 (????-??-??)
4+
5+
* Initial release.

CODE_OF_CONDUCT.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to make participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies within all project spaces, and it also applies when
49+
an individual is representing the project or its community in public spaces.
50+
Examples of representing a project or community include using an official
51+
project e-mail address, posting via an official social media account, or acting
52+
as an appointed representative at an online or offline event. Representation of
53+
a project may be further defined and clarified by project maintainers.
54+
55+
This Code of Conduct also applies outside the project spaces when there is a
56+
reasonable belief that an individual's behavior may have a negative impact on
57+
the project or its community.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported by contacting the project team at <[email protected]>. All
63+
complaints will be reviewed and investigated and will result in a response that
64+
is deemed necessary and appropriate to the circumstances. The project team is
65+
obligated to maintain confidentiality with regard to the reporter of an incident.
66+
Further details of specific enforcement policies may be posted separately.
67+
68+
Project maintainers who do not follow or enforce the Code of Conduct in good
69+
faith may face temporary or permanent repercussions as determined by other
70+
members of the project's leadership.
71+
72+
## Attribution
73+
74+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
75+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
76+
77+
[homepage]: https://www.contributor-covenant.org
78+
79+
For answers to common questions about this code of conduct, see
80+
https://www.contributor-covenant.org/faq

CONTRIBUTING.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Contributing to `merge_raft`
2+
3+
We want to make contributing to this project as easy and transparent as possible.
4+
5+
## Our Development Process
6+
7+
`merge_raft` is currently developed in Meta's internal repositories and then exported out to GitHub by a Meta team member; however, we invite you to submit pull requests as described below.
8+
9+
## Pull Requests
10+
11+
We actively welcome your pull requests.
12+
13+
1. Fork the repo and create your branch from `main`.
14+
2. If you've added code that should be tested, add tests.
15+
3. If you've changed APIs, update the documentation.
16+
4. Ensure the test suite passes.
17+
5. Make sure your code lints.
18+
6. If you haven't already, complete the Contributor License Agreement ("CLA").
19+
20+
## Contributor License Agreement ("CLA")
21+
22+
In order to accept your pull request, we need you to submit a CLA. You only need to do this once to work on any of Meta's open source projects.
23+
24+
Complete your CLA here: <https://code.facebook.com/cla>
25+
26+
## Issues
27+
28+
We use GitHub issues to track public bugs. Please ensure your description is clear and has sufficient instructions to be able to reproduce the issue.
29+
30+
Meta has a [bounty program](https://www.facebook.com/whitehat/) for the safe disclosure of security bugs. In those cases, please go through the process outlined on that page and do not file a public issue.
31+
32+
## Coding Style
33+
34+
Please run `make format` before submitting your changes.
35+
36+
## License
37+
38+
By contributing to `merge_raft`, you agree that your contributions will be licensed under the Apache License Version 2.0 license found in the LICENSE.md file in the root directory of this source tree.

0 commit comments

Comments
 (0)