-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Combine workflows into one github workflow file
- Loading branch information
1 parent
618b6b2
commit 8955566
Showing
3 changed files
with
63 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Build and Test | ||
|
||
on: | ||
pull_request: | ||
branches: [ main ] | ||
schedule: | ||
- cron: '0 12 * * FRI' | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
env: | ||
ENV_DIR: /usr/share/miniconda3/envs/test-env/ | ||
QT_QPA_PLATFORM: offscreen | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
- name: Setup Miniconda | ||
uses: conda-incubator/[email protected] | ||
with: | ||
miniforge-variant: Mambaforge | ||
environment-file: conda/testing.yml | ||
activate-environment: test-env | ||
- name: Build & Install Project | ||
run: | | ||
cmake --preset=ninja -DPYTHON_EXECUTABLE=$ENV_DIR/bin/python -Dpybind11_DIR=$ENV_DIR/share/cmake/pybind11 -DCMAKE_INSTALL_PREFIX=$ENV_DIR -DCMAKE_INSTALL_LIBDIR=$ENV_DIR/lib/python3.8/site-packages . | ||
cd ../build | ||
ninja | ||
ninja install | ||
$ENV_DIR/bin/python -m pip install --ignore-installed ../N-Body-Simulations | ||
- name: Cpp Unit Tests | ||
env: | ||
TESTPATH: ${{ github.workspace }}/../build/tests/unit_tests/cpp | ||
run: | | ||
$TESTPATH/NBodySimulationsUnitTests | ||
- name: Cpp System Tests | ||
env: | ||
TESTPATH: ${{ github.workspace }}/../build/tests/system_tests/cpp | ||
run: | | ||
$TESTPATH/NBodySimulationsSystemTests | ||
- name: Python Unit Tests | ||
run: | | ||
coverage run -m pytest tests/unit_tests/python/ | ||
- name: Report Unit Test Coverage | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
coveralls --service=github | ||
coverage report | ||
- name: Python System Tests | ||
run: | | ||
pytest tests/system_tests/python/ |
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 |
---|---|---|
|
@@ -16,3 +16,4 @@ dependencies: | |
- pre-commit | ||
- pytest | ||
- pytest-mock | ||
- python=3.8.* |
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 |
---|---|---|
|
@@ -15,6 +15,7 @@ dependencies: | |
- ninja | ||
- pybind11 | ||
- pyside2 | ||
- python=3.8.* | ||
- pyqt | ||
- pre-commit | ||
- pytest | ||
|