Skip to content

Run tests

Run tests #3

Workflow file for this run

name: Run tests
description: Run tests
on:
workflow_dispatch:
inputs:
tag:
description: 'Commit / Branch / Tag / SHA to checkout'
required: false
default: ''
python-version:
description: 'Python version'
required: true
default: '3.6'
pytorch-version:
description: 'PyTorch version'
required: true
default: '1.8'
workflow_call:
inputs:
tag:
description: 'Commit / Branch / Tag / SHA to checkout'
required: false
default: ''
type: string
python-version:
description: 'Python version'
required: true
default: '3.6'
type: string
pytorch-version:
description: 'PyTorch version'
required: true
default: '1.8'
type: string
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
ref: ${{ inputs.tag }}
- name: Setup Python ${{ inputs.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
- name: Install dependencies
shell: bash
env:
PYTORCH_VERSION: ${{ inputs.pytorch-version }}
run: |
pip install "torch==${PYTORCH_VERSION}" --index-url https://download.pytorch.org/whl/cpu
pip install pytest
- name: Install package
shell: bash
run: pip install .
- name: Test with pytest
shell: bash
run: pytest