Create unittest.yaml #8
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: unittest-on-commit | |
on: | |
pull_request: | |
types: [synchronize] | |
jobs: | |
run-script: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 # Specify version for best practices | |
- name: Set up Conda | |
uses: conda-incubator/setup-miniconda@v2 # Specify version here as well | |
with: | |
auto-update-conda: true | |
python-version: '3.10' | |
activate-environment: orbgen | |
use-only-tar-bz2: true | |
- name: Install prerequisite by conda | |
run: | | |
conda install pytorch torchvision torchaudio cpuonly -c pytorch | |
- name: Install the package | |
run: | | |
pip install . | |
- name: Set up permissions for execute | |
run: chmod +x ./.github/tests/xtest.sh | |
- name: Run xtest.sh shell script | |
run: | | |
output=$(./.github/tests/xtest.sh) | |
exit_code=$? | |
echo "$output" | |
if [ $exit_code -ne 0 ]; then | |
echo "Tests failed with exit code $exit_code" | |
exit $exit_code | |
fi |