-
Notifications
You must be signed in to change notification settings - Fork 24
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 #237 from doizuc/dev
Add Application Testing Workflow Great. Thanks, Nils.
- Loading branch information
Showing
6 changed files
with
96 additions
and
46 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,38 @@ | ||
name: SetupEnvironment | ||
description: 'Setup python environment with conda' | ||
|
||
runs: | ||
using: "composite" | ||
|
||
steps: | ||
- name: 🐍 Setup Mambaforge | ||
uses: conda-incubator/setup-miniconda@v3 | ||
with: | ||
miniforge-version: latest | ||
# miniforge-variant: Mambaforge | ||
# use-mamba: true # mambaforge is now deprecated in favor of miniforge | ||
activate-environment: hypercp | ||
|
||
- name: 🔂 Cache Environment | ||
uses: actions/cache@v4 | ||
with: | ||
path: ${{ env.CONDA }}/envs | ||
key: | ||
conda-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('environment.yml') }}-${{ env.CACHE_NUMBER }} | ||
env: | ||
# Increase this value to reset cache if environment.yml has not changed | ||
CACHE_NUMBER: 0 | ||
id: cache | ||
|
||
- name: 🔄 Update Environment | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
shell: bash -el {0} | ||
run: | | ||
mamba env update -n hypercp -f environment.yml | ||
mamba install --channel=conda-forge pyinstaller==6.6 | ||
- name: 📸 Capture Environment | ||
shell: bash -el {0} | ||
run: | | ||
mamba info | ||
mamba list |
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,40 @@ | ||
name: ApplicationTesting | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- dev | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
||
ApplicationTesting: | ||
name: Application Tests | ||
|
||
runs-on: ${{ matrix.os }} | ||
defaults: # Required for conda environment activation | ||
run: | ||
shell: bash -el {0} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ 'ubuntu-latest', 'macos-latest', 'windows-latest' ] | ||
|
||
steps: | ||
- name: ⏬ Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.inputs.branch }} | ||
|
||
- name: 🔧 Setup Environment | ||
uses: ./.github/actions/SetupEnvironment | ||
|
||
- name: 📑 Capture Environment | ||
run: | | ||
mamba info | ||
mamba list | ||
- name: 🧪 Run Tests | ||
run: | | ||
python run_Sample_Data.py |
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 |
---|---|---|
|
@@ -24,59 +24,28 @@ jobs: | |
os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] | ||
|
||
steps: | ||
- name: Get Branch Name | ||
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT | ||
id: extract_branch | ||
|
||
- name: Checkout Repository | ||
- name: ⏬ Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ steps.extract_branch.outputs.branch }} | ||
|
||
- name: Setup Mambaforge | ||
uses: conda-incubator/setup-miniconda@v3 | ||
with: | ||
miniforge-variant: Mambaforge | ||
miniforge-version: latest | ||
activate-environment: hypercp | ||
use-mamba: true | ||
|
||
- name: Cache Environment | ||
uses: actions/cache@v4 | ||
with: | ||
path: ${{ env.CONDA }}/envs | ||
key: | ||
conda-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('environment.yml') }}-${{ env.CACHE_NUMBER }} | ||
env: | ||
# Increase this value to reset cache if environment.yml has not changed | ||
CACHE_NUMBER: 0 | ||
id: cache | ||
|
||
- name: Update Environment | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: | | ||
mamba env update -n hypercp -f environment.yml | ||
mamba install --channel=conda-forge pyinstaller==6.6 | ||
ref: ${{ github.event.inputs.branch }} | ||
|
||
- name: Capture Environment | ||
run: | | ||
mamba info | ||
mamba list | ||
- name: 🔧 Setup Environment | ||
uses: ./.github/actions/SetupEnvironment | ||
|
||
- name: Make Bundle | ||
- name: 📑 Make Bundle | ||
run: | | ||
python make.py | ||
echo "BUNDLE_NAME=$(ls Bundled/dist | head -1 | xargs)" >> $GITHUB_ENV | ||
- name: Zip Bundle | ||
- name: 📥 Zip Bundle | ||
uses: thedoctor0/[email protected] | ||
with: | ||
type: 'zip' | ||
directory: 'Bundled/dist/' | ||
path: '${{ env.BUNDLE_NAME }}' | ||
filename: '${{ env.BUNDLE_NAME }}.zip' | ||
|
||
- name: Upload Bundle | ||
- name: ⏫️ Upload Bundle | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ env.BUNDLE_NAME }} | ||
|
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