Skip to content

Merge openadapt latest to this branch #13

Merge openadapt latest to this branch

Merge openadapt latest to this branch #13

Workflow file for this run

name: Python CI
on:
pull_request_target:
branches:
- '**'
jobs:
run-ci:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
strategy:
matrix:
# TODO: add windows matrix
os: [macos-latest]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Run tests using the shell script (macOS compatible).
if: matrix.os == 'macos-latest'
run: SKIP_POETRY_SHELL=1 sh install/install_openadapt.sh
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Install poetry
uses: snok/install-poetry@v1
with:
version: 1.5.1
virtualenvs-create: true
virtualenvs-in-project: true
- name: Cache deps
id: cache-deps
uses: actions/cache@v2
with:
path: .venv
key: pydeps-${{ hashFiles('**/poetry.lock') }}
- run: poetry install --no-interaction --no-root
if: steps.cache-deps.outputs.cache-hit != 'true'
- name: Check formatting with Black
run: poetry run black --preview --check .
- name: Run Flake8
run: poetry run flake8