-
Notifications
You must be signed in to change notification settings - Fork 154
GitHub actions #370
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
Merged
Merged
GitHub actions #370
Changes from all commits
Commits
Show all changes
46 commits
Select commit
Hold shift + click to select a range
c8e7bed
Add credo
joeapearson 126dda7
mix format
joeapearson e2a3445
Add github actions
joeapearson 79eae87
Really basic contributing.md
joeapearson 836e391
Matricise build
joeapearson f24988d
Bump latest versions
joeapearson 034658c
Add docker compose
joeapearson 9235332
Docker compose in deamon mode
joeapearson 2f6fb95
Attempt to run tests in CI
joeapearson bd53bba
Use sudo
joeapearson 39af7ad
Fix tests
joeapearson 0f56b27
Use github provisioned mongo
joeapearson 0c30773
Split jobs
joeapearson 3a4b89c
Specify otp and el ver
joeapearson 7a94cd0
Set otp ver
joeapearson bac4346
Run mix deps.get
joeapearson 2b4aa04
Continue on formatting and linting errors for now
joeapearson 0fd6d63
Cache build
joeapearson b7dca43
Cache PLTs
joeapearson e5e9b25
Use existing bash script
joeapearson 6b8ad88
Install matrix version
joeapearson 89ce90b
Add mongo status output
joeapearson aad4b0d
Use start mongo script
joeapearson 394b054
Split mongo version
joeapearson 229dad9
Allow downgrades of mongodb
joeapearson ec48ef2
Only test Mongo 4.4 for now
joeapearson 42bacd8
Cleanup
joeapearson 4991c91
More selective run rules
joeapearson af32ef5
Merge branch 'master' into github-actions
scottmessinger 2cfa162
Update CI to use mongodb setup used in other drivers
scottmessinger bebda64
Remove duplicate ci line
scottmessinger 4bd8149
fix steps for ci
scottmessinger 5e7fb2b
Move name
scottmessinger 2f4a94b
fix elixir version
scottmessinger 8415122
set ubuntu
scottmessinger e87b0f9
Install deps
scottmessinger e508a63
Try to pass in the mongodb uri
scottmessinger 4462e28
Comment out text
scottmessinger 815add0
Mongo 4.2 isn't available in the setup so removing
scottmessinger ccbc6e2
Does not yet work on Mongo 5.0 and 6.0
scottmessinger 2ea0a15
Comment unused references to test we commented out
scottmessinger 4c7ec51
Change test threshold to 70
scottmessinger 74cc2f7
Make tests for 5.0 pass
scottmessinger 6f0ba78
Remove tests for putting write concern 0
scottmessinger a75e09f
Remove call to deprecated function at compile time
scottmessinger 84493f4
Remove call to deprecated function at compile time
scottmessinger File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
code-quality: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: erlef/setup-beam@v1 | ||
with: | ||
# Just some default versions to run code quality tools with. | ||
# These can be upgraded as and when but probably won't need to change much. | ||
otp-version: "24.3.4" | ||
elixir-version: "1.12.3" | ||
- uses: actions/cache@v2 | ||
with: | ||
path: | | ||
deps | ||
_build | ||
priv/plts | ||
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-mix- | ||
- run: mix deps.get | ||
- run: mix credo --strict | ||
continue-on-error: true | ||
- run: mix format --check-formatted | ||
continue-on-error: true | ||
- run: mix dialyzer | ||
test: | ||
env: | ||
CI: true | ||
TESTOPTS: "-v" | ||
runs-on: ubuntu-20.04 | ||
continue-on-error: true | ||
name: "mongodb-${{matrix.mongodb}} ${{matrix.otpElixir.otp}}/${{matrix.otpElixir.elixir}}" | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
mongodb: ["4.4", "5.0"] | ||
otpElixir: [ | ||
{otp: "22.3.4.26", elixir: "1.12.3"}, | ||
{otp: "23.3.4.18", elixir: "1.13.4"}, | ||
{otp: "24.3.4.10", elixir: "1.14.3"} | ||
] | ||
topology: [replica_set] | ||
steps: | ||
- name: repo checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
- id: start-mongodb | ||
name: start mongodb | ||
uses: mongodb-labs/drivers-evergreen-tools@master | ||
with: | ||
version: "${{matrix.mongodb}}" | ||
topology: "${{matrix.topology}}" | ||
- uses: erlef/setup-beam@v1 | ||
with: | ||
otp-version: ${{ matrix.otpElixir.otp }} | ||
elixir-version: ${{ matrix.otpElixir.elixir }} | ||
- uses: actions/cache@v2 | ||
with: | ||
path: | | ||
deps | ||
_build | ||
key: ${{ runner.os }}-${{matrix.otpElixir.otp}}-${{matrix.otpElixir.elixir}}-mix-${{ hashFiles('**/mix.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-${{matrix.otpElixir.otp}}-${{matrix.otpElixir.elixir}}-mix- | ||
- run: mix deps.get | ||
- run: mix test --cover | ||
env: | ||
MONGODB_URI: ${{ steps.setup-mongodb.outputs.cluster-uri }} | ||
|
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Contributing | ||
|
||
Thanks for considering making a contribution to `mongodb`! | ||
|
||
## Getting started | ||
|
||
1. Clone this repository | ||
2. Install mongodb and make sure it's available on `$PATH` | ||
3. Run `start_mongo.bash` | ||
joeapearson marked this conversation as resolved.
Show resolved
Hide resolved
|
||
4. Run `mix test` | ||
|
||
|
||
## What's next? | ||
|
||
1. Take a look at our [open issues](https://github.com/elixir-mongo/mongodb/issues) | ||
2. Create a new issue or open a discussion for larger topics. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.