-
Notifications
You must be signed in to change notification settings - Fork 51
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: Test matrix #1862
ci: Test matrix #1862
Changes from all commits
3f4c940
25eb1cc
95200e6
a6c6876
4f4bb35
9cfbbb7
73eddb2
a349561
6662cf3
80784f6
d9be82d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,10 +20,29 @@ on: | |
|
||
jobs: | ||
run-tests: | ||
name: Run tests job | ||
name: Run tests job matrix | ||
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. praise: 😍 😍 😍 I did not know we could do this. And I really want it. Thank you very much for opening this draft. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thought: This will increase the visibility of any test flakiness. This could be extremely annoying, but will force us to sort out flakiness. |
||
client-type: [go, http] | ||
database-type: [badger-file, badger-memory] | ||
mutation-type: [gql, collection-named, collection-save] | ||
detect-changes: [false] | ||
include: | ||
- client-type: go | ||
database-type: badger-memory | ||
mutation-type: collection-save | ||
detect-changes: true | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thought: Once we remove the
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added both the change detector and non change detector to the include so both will now run. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thought: I think we should also include the codecov stuff in this file, and delete the codecov workflow. I don't want to mark this as a todo though, as I'm still playing around with it and it can be done after easily enough. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm happy to try and get that working. |
||
env: | ||
DEFRA_CLIENT_GO: ${{ matrix.client-type == 'go' }} | ||
DEFRA_CLIENT_HTTP: ${{ matrix.client-type == 'http' }} | ||
DEFRA_BADGER_MEMORY: ${{ matrix.database-type == 'badger-memory' }} | ||
DEFRA_BADGER_FILE: ${{ matrix.database-type == 'badger-file' }} | ||
DEFRA_MUTATION_TYPE: ${{ matrix.mutation-type }} | ||
|
||
steps: | ||
- name: Checkout code into the directory | ||
uses: actions/checkout@v3 | ||
|
@@ -39,12 +58,39 @@ jobs: | |
make deps:modules | ||
make deps:test | ||
|
||
- name: Build binary | ||
run: make build | ||
- name: Run integration tests | ||
if: ${{ !matrix.detect-changes }} | ||
run: make test:ci | ||
|
||
- name: Run change detector tests | ||
if: ${{ matrix.detect-changes }} | ||
run: make test:changes | ||
|
||
# This is to ensure tests pass with a running server. | ||
- name: Start server from binary | ||
run: ./build/defradb start & | ||
- name: Upload coverage artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ matrix.client-type }}_${{ matrix.database-type }}_${{ matrix.mutation-type }} | ||
path: coverage.txt | ||
if-no-files-found: error | ||
retention-days: 1 | ||
|
||
- name: Run the tests, showing name of each test | ||
run: make test:ci | ||
upload-coverage: | ||
name: Upload test code coverage | ||
|
||
runs-on: ubuntu-latest | ||
|
||
needs: run-tests | ||
|
||
steps: | ||
- name: Download coverage reports | ||
uses: actions/download-artifact@v3 | ||
|
||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
name: defradb-codecov | ||
flags: all-tests | ||
os: 'linux' | ||
fail_ci_if_error: true | ||
verbose: true |
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thought: We could also include this in the matrix at somepoint if we want (I would like this).