-
Notifications
You must be signed in to change notification settings - Fork 470
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
202 additions
and
132 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -10,7 +10,6 @@ on: | |
- "plugins/**" | ||
- ".github/**" | ||
- 'docs/**' | ||
- 'examples/**' | ||
- '*.md' | ||
- '*.rst' | ||
workflow_dispatch: | ||
|
This file contains 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,62 @@ | ||
name: Code Testing mongodb | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
paths: # Paths that may affect code quality | ||
- "plugins/mongodb/**" | ||
|
||
jobs: | ||
# --------------------------------- | ||
# Unit Testing | ||
# --------------------------------- | ||
unit_testing_mongodb: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ "ubuntu-latest" ] | ||
python-version: ["3.11"] | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
#--------------------------------------------------- | ||
# Configuring Python environments. | ||
# | ||
# We cache both the pip packages and the installation dir. | ||
# If the pyproject remains unchanged, we re-use the existing installation dir. | ||
# If the pyproject has changed, we reinstall everything using the cached pip packages. | ||
- name: Cache Pip Packages | ||
id: setup-python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: 'pip' # caching pip dependencies | ||
|
||
- name: Check for test directory | ||
id: check_test_dir | ||
run: | | ||
if [ ! -d "plugins/mongodb/test" ]; then | ||
echo "Test directory does not exist. Cancelling workflow." | ||
exit 1 | ||
fi | ||
- name: Cache Python Installation | ||
uses: actions/cache@v4 | ||
with: | ||
path: ${{ env.pythonLocation }} # Cache the whole python installation dir. | ||
key: ${{ matrix.os }}_python-${{ matrix.python-version }}_${{ hashFiles('pyproject.toml', '*/pyproject.toml') }} | ||
#--------------------------------------------------- | ||
|
||
- name: Install SuperDuperDB Project | ||
run: | | ||
# Install core and testsuite dependencies on the cached python environment. | ||
python -m pip install . | ||
cd plugins/mongodb && python -m pip install . | ||
- name: Run tests | ||
run: | | ||
python -m pip install pytest | ||
cd plugins/mongodb && pytest test |
This file contains 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
File renamed without changes.
File renamed without changes.
This file contains 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,62 @@ | ||
name: Code Testing #PLUGIN | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
paths: # Paths that may affect code quality | ||
- "plugins/#PLUGIN/**" | ||
|
||
jobs: | ||
# --------------------------------- | ||
# Unit Testing | ||
# --------------------------------- | ||
unit_testing_#PLUGIN: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ "ubuntu-latest" ] | ||
python-version: ["3.11"] | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
#--------------------------------------------------- | ||
# Configuring Python environments. | ||
# | ||
# We cache both the pip packages and the installation dir. | ||
# If the pyproject remains unchanged, we re-use the existing installation dir. | ||
# If the pyproject has changed, we reinstall everything using the cached pip packages. | ||
- name: Cache Pip Packages | ||
id: setup-python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: 'pip' # caching pip dependencies | ||
|
||
- name: Check for test directory | ||
id: check_test_dir | ||
run: | | ||
if [ ! -d "plugins/#PLUGIN/test" ]; then | ||
echo "Test directory does not exist. Cancelling workflow." | ||
exit 1 | ||
fi | ||
- name: Cache Python Installation | ||
uses: actions/cache@v4 | ||
with: | ||
path: ${{ env.pythonLocation }} # Cache the whole python installation dir. | ||
key: ${{ matrix.os }}_python-${{ matrix.python-version }}_${{ hashFiles('pyproject.toml', '*/pyproject.toml') }} | ||
#--------------------------------------------------- | ||
|
||
- name: Install SuperDuperDB Project | ||
run: | | ||
# Install core and testsuite dependencies on the cached python environment. | ||
python -m pip install . | ||
cd plugins/#PLUGIN && python -m pip install . | ||
- name: Run tests | ||
run: | | ||
python -m pip install pytest | ||
cd plugins/#PLUGIN && pytest test |
This file contains 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.