-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #67 from glotzerlab/github-actions
Migrate to GitHub Actions CI
- Loading branch information
Showing
17 changed files
with
187 additions
and
87 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,45 @@ | ||
name: Notebook Tests | ||
|
||
on: | ||
# trigger on pull requests | ||
pull_request: | ||
|
||
# trigger on all commits to main | ||
push: | ||
branches: | ||
- 'main' | ||
|
||
# trigger on request | ||
workflow_dispatch: | ||
concurrency: | ||
group: "${{ github.workflow }}-${{ github.ref }}" | ||
cancel-in-progress: true | ||
jobs: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
config: | ||
- python: '3.12' | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: "recursive" | ||
- name: Create Python Environment | ||
uses: conda-incubator/[email protected] | ||
with: | ||
python-version: ${{ matrix.config.python }} | ||
environment-file: environment.yml | ||
activate-environment: test | ||
channels: conda-forge | ||
show-channel-urls: true | ||
miniforge-version: latest | ||
use-mamba: true | ||
- name: Test notebooks | ||
shell: bash -el {0} # Required for conda activation | ||
run: | | ||
python -m pytest -v --nbval --nbval-lax notebooks/ |
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,46 @@ | ||
name: Project Tests | ||
|
||
on: | ||
# trigger on pull requests | ||
pull_request: | ||
|
||
# trigger on all commits to main | ||
push: | ||
branches: | ||
- 'main' | ||
|
||
# trigger on request | ||
workflow_dispatch: | ||
concurrency: | ||
group: "${{ github.workflow }}-${{ github.ref }}" | ||
cancel-in-progress: true | ||
jobs: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
config: | ||
- python: '3.12' | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: "recursive" | ||
- name: Create Python Environment | ||
uses: conda-incubator/[email protected] | ||
with: | ||
python-version: ${{ matrix.config.python }} | ||
environment-file: environment.yml | ||
activate-environment: test | ||
channels: conda-forge | ||
show-channel-urls: true | ||
miniforge-version: latest | ||
use-mamba: true | ||
- name: Test projects | ||
shell: bash -el {0} # Required for conda activation | ||
run: | | ||
cd projects | ||
. run-tests.sh --output |
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
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
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
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
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
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
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
Large diffs are not rendered by default.
Oops, something went wrong.
42 changes: 23 additions & 19 deletions
42
notebooks/signac_106_signac-flow_HOOMD-blue_Example.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
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
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
Empty file.
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 |
---|---|---|
@@ -1,22 +1,25 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
set -euo pipefail | ||
|
||
export USE_INDEX_CACHE="" | ||
for PROJECT in `ls -d */`; do | ||
if [ -e "${PROJECT}/.skipci" ]; then | ||
echo "Skipping tests for project ${PROJECT}." | ||
echo "Skipping ${PROJECT}" | ||
continue | ||
fi | ||
if [[ "$CI" ]]; then | ||
echo "::group::Executing ${PROJECT}" | ||
else | ||
echo "Executing ${PROJECT}" | ||
fi | ||
REQUIREMENTS_FILE="${PROJECT}/requirements.txt" | ||
echo "Run test for ${PROJECT}." | ||
if [ -e ${REQUIREMENTS_FILE} ]; then | ||
echo "Installing requirements:" | ||
cat ${REQUIREMENTS_FILE} | ||
|
||
# Re-use the conda index cache after the first time. | ||
conda install --yes ${USE_INDEX_CACHE} --file ${REQUIREMENTS_FILE} | ||
export USE_INDEX_CACHE="--use-index-cache" | ||
mamba install --yes --file ${REQUIREMENTS_FILE} --quiet | ||
fi | ||
python flow-test.py ${PROJECT} -vv --timeout=600 $@ | ||
if [[ "$CI" ]]; then | ||
echo "::endgroup::" | ||
fi | ||
done |