Skip to content

Merge pull request #1 from SynthesisLab/dependabot/pip/torch-1.13.1 #3

Merge pull request #1 from SynthesisLab/dependabot/pip/torch-1.13.1

Merge pull request #1 from SynthesisLab/dependabot/pip/torch-1.13.1 #3

Workflow file for this run

name: Tests
on:
push:
branches: [ '*' ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
#----------------------------------------------
# ----- install & configure poetry -----
#----------------------------------------------
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
#----------------------------------------------
# load cached venv if cache exists
#----------------------------------------------
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v2
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
#----------------------------------------------
# install dependencies if cache does not exist
#----------------------------------------------
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
continue-on-error: true
run: poetry install --no-interaction --no-root
#----------------------------------------------
# install your root project, if required
#----------------------------------------------
- name: Install library
run: poetry install --no-interaction
#----------------------------------------------
# format, type check, and test your code
#----------------------------------------------
- name: Black code formatting
run: |
poetry run black --check --diff .
- name: MyPy
run: |
poetry run mypy synth