Feature/add plots to result #649
Workflow file for this run
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
name: Analyze | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
Analyze: | |
if: ${{ !contains(github.event.head_commit.message, 'Bump version') }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
python-version: [3.9] | |
os: [ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: "pip" | |
cache-dependency-path: setup.py | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install .[all] | |
- name: Pack test recipe | |
run: | | |
pack -r cellpack/tests/recipes/v2/test_spheres.json -c cellpack/tests/packing-configs/test_config.json | |
- name: Modify JSON with PR sub_directory path | |
run: | | |
jq --arg branch_name "${{ github.ref_name }}" '.create_report.output_image_location |= "https://cellpack-results.s3.us-west-2.amazonaws.com/\($branch_name)/spheresSST/figures"' cellpack/tests/analysis-configs/PR_analysis_config.json > cellpack/tests/analysis-configs/PR_analysis_config_temp.json | |
mv cellpack/tests/analysis-configs/PR_analysis_config_temp.json cellpack/tests/analysis-configs/PR_analysis_config.json | |
- name: Run analysis code | |
run: analyze -r cellpack/tests/recipes/v2/test_spheres.json -a cellpack/tests/analysis-configs/PR_analysis_config.json -p cellpack/tests/outputs/test_spheres/spheresSST | |
- name: Upload results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: results | |
path: cellpack/tests/outputs/test_spheres/ | |
Comment: | |
runs-on: ubuntu-latest | |
needs: [Analyze] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: us-west-2 | |
- uses: actions/download-artifact@v3 | |
- name: Copy files to results bucket | |
run: aws s3 cp ./results s3://cellpack-results/${{ github.ref_name }}/ --recursive --acl public-read | |
- uses: iterative/setup-cml@v1 | |
- name: Update comment | |
env: | |
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
cml comment update --watermark-title="{workflow} report" ./results/analysis_report.md --target=pr | |
cat ./results/analysis_report.md |