-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve example checking script (#295)
* Skip problematic examples * Introduce variable controlling problem size * Introduce variable controlling problem size * Bug fix * Trivial change * Introduce variable controlling problem size * Trivial change * Remove redundant script run * Trivial change * Include ray tune examples * Update readme * Improve example checking script * Add examples test action * Fix action name * Add missing dependency list * Improve example test script * Enable brief error display * Change Xvfb display number * Add timeout on script run * Debug script hanging * Debug script hanging * Debug script hanging * Avoid excessive resource requests in ray[tune] examples * Remove debugging code * Update contributing docs
- Loading branch information
Showing
16 changed files
with
164 additions
and
30 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,80 @@ | ||
# Install scico requirements and run pytest | ||
|
||
name: test examples | ||
|
||
# Control when the workflow will run | ||
on: | ||
# Trigger the workflow on push or pull request events but only for the main branch | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
# Allow this workflow to be run manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- os: ubuntu-latest | ||
label: linux-64 | ||
prefix: /usr/share/miniconda3/envs/test-env | ||
name: ${{ matrix.label }} | ||
runs-on: ${{ matrix.os }} | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Check-out the repository under $GITHUB_WORKSPACE | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
# Set up conda/mamba environment | ||
- name: Set up mambaforge | ||
uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
miniforge-variant: Mambaforge | ||
miniforge-version: latest | ||
activate-environment: test-env | ||
use-mamba: true | ||
python-version: 3.9 | ||
# Configure conda environment cache | ||
- name: Set up conda environment cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ env.CONDA }}/envs | ||
key: conda-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('dev_requirements.txt') }}-${{ hashFiles('examples/examples_requirements.txt') }}-${{ env.CACHE_NUMBER }} | ||
env: | ||
CACHE_NUMBER: 0 # Increase this value to force cache reset | ||
id: cache | ||
# Display environment details | ||
- name: Display environment details | ||
run: | | ||
conda info | ||
printenv | sort | ||
# Install required system package | ||
- name: Install required system package | ||
if: matrix.os == 'ubuntu-latest' | ||
run: sudo apt-get install -y libopenblas-dev | ||
# Install dependencies in conda environment | ||
- name: Install dependencies | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: | | ||
mamba install -c conda-forge pytest pytest-cov | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
pip install -r dev_requirements.txt | ||
mamba install -c astra-toolbox astra-toolbox | ||
mamba install -c conda-forge pyyaml | ||
pip install -r examples/examples_requirements.txt | ||
# Install package to be tested | ||
- name: Install package to be tested | ||
run: pip install -e . | ||
# Run example test | ||
- name: Run example test | ||
run: | | ||
${GITHUB_WORKSPACE}/examples/scriptcheck.sh -e -d |
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
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
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