Skip to content

WIP: separate image testing workflow using the testing playground #64

WIP: separate image testing workflow using the testing playground

WIP: separate image testing workflow using the testing playground #64

Workflow file for this run

# This workflow only tests the model on PRs, not on every push to the main branch.
# TODO(@dhanshree): Test ersilia in all supported Python versions
name: Model Test on PR
on:
pull_request:
jobs:
test:
if: github.repository != 'ersilia-os/eos-template'
runs-on: ubuntu-latest
steps:
# This might stop working in the future, so we need to keep an eye on it
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
tool-cache: true
# all of these default to true, but feel free to set to
# "false" if necessary for your workflow
android: true
dotnet: true
haskell: true
large-packages: true
swap-storage: true
- uses: actions/[email protected]
with:
lfs: true
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: "3.10.10"
- name: Install dependencies
run: |
conda install git-lfs -c conda-forge
git-lfs install
conda install gh -c conda-forge
python -m pip install 'ersilia[test]'
# TODO(@dhanshree) We can potentially restore the retries.
# TODO(@dhanshree) Correct the test command as needed
- name: Test model
env:
MODEL_ID: ${{ github.event.repository.name }}
run: |
ersilia -v test $MODEL_ID -d . --inspect -l deep > test.log
# Remove mock.txt if it exists
- name: Cleanup
run: |
if [ -f "mock.txt" ]; then
echo "Removing mock.txt file"
rm "mock.txt"
else
echo "mock.txt not found, skipping removal"
fi
# Upload EOS logs and test logs
- name: Upload log output
if: always()
uses: actions/[email protected]
with:
name: debug-logs
retention-days: 14
path: |
/home/runner/eos/*.log

Check failure on line 70 in .github/workflows/test-model-pr.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/test-model-pr.yml

Invalid workflow file

You have an error in your yaml syntax on line 70
./*.log